From 07807ce8b010fbedfb2237e8f13ce6779d6f85bb Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sat, 29 Jul 2017 20:45:53 +0100 Subject: [PATCH] ircd: send_to_channel_flags: avoid clang static analysis warning Set current_capmask and then use it, instead of referencing target_p->localClient->caps again. This makes the purpose of current_capmask a bit clearer. --- ircd/send.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircd/send.c b/ircd/send.c index a9698ade..ee0dabb0 100644 --- a/ircd/send.c +++ b/ircd/send.c @@ -543,8 +543,8 @@ sendto_channel_flags(struct Client *one, int type, struct Client *source_p, rb_linebuf_newbuf(&rb_linebuf_local); /* render the new linebuf and attach it */ - linebuf_put_msgbuf(&msgbuf, &rb_linebuf_local, target_p->localClient->caps, "%s", buf); current_capmask = target_p->localClient->caps; + linebuf_put_msgbuf(&msgbuf, &rb_linebuf_local, current_capmask, "%s", buf); } _send_linebuf(target_p, &rb_linebuf_local); @@ -563,8 +563,8 @@ sendto_channel_flags(struct Client *one, int type, struct Client *source_p, rb_linebuf_newbuf(&rb_linebuf_local); /* render the new linebuf and attach it */ - linebuf_put_msgbuf(&msgbuf, &rb_linebuf_local, target_p->localClient->caps, "%s", buf); current_capmask = target_p->localClient->caps; + linebuf_put_msgbuf(&msgbuf, &rb_linebuf_local, current_capmask, "%s", buf); } _send_linebuf(target_p, &rb_linebuf_local);