]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
ircd: get_or_create_channel: avoid clang static analysis warning
authorSimon Arlott <sa.me.uk>
Sat, 29 Jul 2017 19:14:43 +0000 (20:14 +0100)
committerSimon Arlott <sa.me.uk>
Sat, 29 Jul 2017 21:28:51 +0000 (22:28 +0100)
Use `len` after setting it.

ircd/hash.c

index 4341dbbdcfa1de7ed2db4ae83686befeefc73dbd..cd8e8aa8dc31c4262bf7f167d21b0d548f5f6d75 100644 (file)
@@ -426,7 +426,7 @@ get_or_create_channel(struct Client *client_p, const char *chname, bool *isnew)
                }
                len = CHANNELLEN;
                t = LOCAL_COPY(s);
-               *(t + CHANNELLEN) = '\0';
+               t[len] = '\0';
                s = t;
        }