From b9a6f1e5a1d6be43486ea20073afd4192df33b97 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sat, 29 Jul 2017 20:14:43 +0100 Subject: [PATCH] ircd: get_or_create_channel: avoid clang static analysis warning Use `len` after setting it. --- ircd/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircd/hash.c b/ircd/hash.c index 4341dbbd..cd8e8aa8 100644 --- a/ircd/hash.c +++ b/ircd/hash.c @@ -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; }