src/supported.c: misc cleanups for compiler warnings
supported.c:172:22: warning: possible misuse of comma operator here [-Wcomma] (... and 4 more of the same)
This commit is contained in:
parent
f21bac62f4
commit
ec5f6dc23b
1 changed files with 11 additions and 3 deletions
|
@ -169,7 +169,10 @@ show_isupport(struct Client *client_p)
|
|||
/* form_str(RPL_ISUPPORT) is %s :are supported by this server */
|
||||
extra_space += strlen(me.name) + 1 + strlen(form_str(RPL_ISUPPORT));
|
||||
|
||||
nchars = extra_space, nparams = 0, buf[0] = '\0';
|
||||
nchars = extra_space;
|
||||
nparams = 0;
|
||||
buf[0] = '\0';
|
||||
|
||||
RB_DLINK_FOREACH(ptr, isupportlist.head)
|
||||
{
|
||||
item = ptr->data;
|
||||
|
@ -180,10 +183,15 @@ show_isupport(struct Client *client_p)
|
|||
if (nchars + l + (nparams > 0) >= sizeof buf || nparams + 1 > 12)
|
||||
{
|
||||
sendto_one_numeric(client_p, RPL_ISUPPORT, form_str(RPL_ISUPPORT), buf);
|
||||
nchars = extra_space, nparams = 0, buf[0] = '\0';
|
||||
nchars = extra_space;
|
||||
nparams = 0;
|
||||
buf[0] = '\0';
|
||||
}
|
||||
if (nparams > 0)
|
||||
rb_strlcat(buf, " ", sizeof buf), nchars++;
|
||||
{
|
||||
rb_strlcat(buf, " ", sizeof buf);
|
||||
nchars++;
|
||||
}
|
||||
rb_strlcat(buf, item->name, sizeof buf);
|
||||
if (!EmptyString(value))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue