Explorar o código

* NICKLEN already includes a NULL-terminator.

Bryan Drewery %!s(int64=16) %!d(string=hai) anos
pai
achega
89c9168baf
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 3 3
      src/chanprog.c
  2. 1 1
      src/chanprog.h

+ 3 - 3
src/chanprog.c

@@ -58,10 +58,10 @@ char *def_chanset = "+enforcebans +dynamicbans +userbans -bitch +cycle -inactive
 struct chanset_t 	*chanset = NULL;	/* Channel list			*/
 struct chanset_t 	*chanset = NULL;	/* Channel list			*/
 struct chanset_t	*chanset_default = NULL;	/* Default channel list */
 struct chanset_t	*chanset_default = NULL;	/* Default channel list */
 char 			admin[121] = "";	/* Admin info			*/
 char 			admin[121] = "";	/* Admin info			*/
-char			origbotnick[NICKLEN + 1] = "";	/* from -B (placed into conf.bot->nick .. for backup when conf is cleared */
-char 			origbotname[NICKLEN + 1] = "";	/* Nick to regain */
+char			origbotnick[NICKLEN] = "";	/* from -B (placed into conf.bot->nick .. for backup when conf is cleared */
+char 			origbotname[NICKLEN] = "";	/* Nick to regain */
 char                    jupenick[NICKLEN] = "";
 char                    jupenick[NICKLEN] = "";
-char 			botname[NICKLEN + 1] = "";	/* IRC nickname */
+char 			botname[NICKLEN] = "";	/* IRC nickname */
 port_t     		my_port = 0;
 port_t     		my_port = 0;
 bool			reset_chans = 0;
 bool			reset_chans = 0;
 bool                    cookies_disabled = 0;
 bool                    cookies_disabled = 0;

+ 1 - 1
src/chanprog.h

@@ -34,7 +34,7 @@ void load_internal_users();
 void setup_HQ(int);
 void setup_HQ(int);
 
 
 extern struct chanset_t		*chanset, *chanset_default;
 extern struct chanset_t		*chanset, *chanset_default;
-extern char			admin[], origbotnick[NICKLEN + 1], origbotname[NICKLEN + 1], jupenick[NICKLEN], botname[NICKLEN + 1], *def_chanset;
+extern char			admin[], origbotnick[NICKLEN], origbotname[NICKLEN], jupenick[NICKLEN], botname[NICKLEN], *def_chanset;
 extern port_t			my_port;
 extern port_t			my_port;
 extern bool			reset_chans, cookies_disabled;
 extern bool			reset_chans, cookies_disabled;