]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
IRC: minor cleanup
authorJānis Rūcis <parasti@gmail.com>
Tue, 30 Mar 2010 22:58:36 +0000 (01:58 +0300)
committernitroxis <nitroxis@wtwrp.de>
Fri, 10 Jan 2014 19:32:34 +0000 (20:32 +0100)
irc.c

diff --git a/irc.c b/irc.c
index ceed28f9d1bcd812070a6e10edb5b73003040c48..e9050574e080c560a452dca8ff8dd40ce0f80250 100644 (file)
--- a/irc.c
+++ b/irc.c
@@ -106,14 +106,13 @@ static void IRC_ParseArgs(ircmessage_t *msg, const char *args)
 {
        msg->args_num = 0;
 
-       while (msg->args_num < IRC_MAX_ARGS && *args)
+       while (msg->args_num < IRC_MAX_ARGS && args[0])
        {
-               char **arg;
+               char **arg = msg->args + msg->args_num;
                int len;
 
                if (args[0] == ':')
                {
-                       arg = msg->args + msg->args_num;
                        len = strlen(args + 1);
 
                        *arg = Z_Malloc(len + 1);
@@ -125,7 +124,6 @@ static void IRC_ParseArgs(ircmessage_t *msg, const char *args)
                }
                else
                {
-                       arg = msg->args + msg->args_num;
                        len = strcspn(args, " ");
 
                        *arg = Z_Malloc(len + 1);