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.
This commit is contained in:
Simon Arlott 2017-07-29 20:45:53 +01:00
parent d856535edd
commit 07807ce8b0
No known key found for this signature in database
GPG key ID: C8975F2043CA5D24

View file

@ -543,8 +543,8 @@ sendto_channel_flags(struct Client *one, int type, struct Client *source_p,
rb_linebuf_newbuf(&rb_linebuf_local); rb_linebuf_newbuf(&rb_linebuf_local);
/* render the new linebuf and attach it */ /* 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; current_capmask = target_p->localClient->caps;
linebuf_put_msgbuf(&msgbuf, &rb_linebuf_local, current_capmask, "%s", buf);
} }
_send_linebuf(target_p, &rb_linebuf_local); _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); rb_linebuf_newbuf(&rb_linebuf_local);
/* render the new linebuf and attach it */ /* 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; current_capmask = target_p->localClient->caps;
linebuf_put_msgbuf(&msgbuf, &rb_linebuf_local, current_capmask, "%s", buf);
} }
_send_linebuf(target_p, &rb_linebuf_local); _send_linebuf(target_p, &rb_linebuf_local);