From: michael Date: Sun, 15 Mar 2015 17:43:50 +0000 (+0000) Subject: - opercmd.c:command_parse(): don't let command_create() allocate memory for empty... X-Git-Tag: 1.0.4~8 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=9f87ad4bfad3829cb2c7295f584f25380683df73;p=hopm.git - opercmd.c:command_parse(): don't let command_create() allocate memory for empty parameters git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/branches/1.0.x@5701 82007160-df01-0410-b94d-b575c5fd34c7 --- diff --git a/src/opercmd.c b/src/opercmd.c index 07873df..80babcd 100644 --- a/src/opercmd.c +++ b/src/opercmd.c @@ -167,10 +167,8 @@ command_parse(char *command, const struct ChannelConf *target, *param = '\0'; param++; } - else - param = ""; - log_printf("COMMAND -> parsed [%s] [%s]", command, param); + log_printf("COMMAND -> parsed [%s] [%s]", command, param ? param : ""); /* Lookup the command in the table */ for (const struct OperCommandHash *tab = COMMAND_TABLE; tab->command; ++tab)