modules/m_rehash.c: misc cleanups for compiler warnings

m_rehash.c:380:17: warning: possible misuse of comma operator here
                   [-Wcomma]

    (... and 3 more of the same)
This commit is contained in:
Aaron Jones 2017-07-31 06:04:31 +00:00
parent ec5f6dc23b
commit 8952f21843
No known key found for this signature in database
GPG key ID: 8AF0737488AB3012

View file

@ -377,13 +377,25 @@ mo_rehash(struct Client *client_p, struct Client *source_p, int parc, const char
}
if (parc > 2)
type = parv[1], target_server = parv[2];
{
type = parv[1];
target_server = parv[2];
}
else if (parc > 1 && (strchr(parv[1], '.') || strchr(parv[1], '?') || strchr(parv[1], '*')))
type = NULL, target_server = parv[1];
{
type = NULL;
target_server = parv[1];
}
else if (parc > 1)
type = parv[1], target_server = NULL;
{
type = parv[1];
target_server = NULL;
}
else
type = NULL, target_server = NULL;
{
type = NULL;
target_server = NULL;
}
if (target_server != NULL)
{