]> 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)
committerJānis Rūcis <parasti@gmail.com>
Sun, 27 Jun 2010 12:23:20 +0000 (15:23 +0300)
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);