style: clarify control flow

* src/getargs.c (language_argmatch): Initialize msg.
Check it instead of relying on a return.
This commit is contained in:
Akim Demaille
2019-07-07 15:01:45 +02:00
parent 1f02348d6c
commit f99956b550

View File

@@ -506,7 +506,7 @@ skeleton_arg (char const *arg, int prio, location loc)
void
language_argmatch (char const *arg, int prio, location loc)
{
char const *msg;
char const *msg = NULL;
if (prio < language_prio)
{
@@ -521,10 +521,9 @@ language_argmatch (char const *arg, int prio, location loc)
}
else if (language_prio == prio)
msg = _("multiple language declarations are invalid");
else
return;
complain (&loc, complaint, msg, quotearg_colon (arg));
if (msg)
complain (&loc, complaint, msg, quotearg_colon (arg));
}
/*----------------------.