style(9) question
Dmitry Pryanishnikov
dmitry at atlantis.dp.ua
Thu Mar 2 18:58:53 GMT 2006
Hello!
On Thu, 2 Mar 2006, Colin Percival wrote:
>> I can't really think of a good reason
>> for return (foo) over return foo
>
> I'm not sure if this qualifies as a *good* reason, but
> writing "return (foo)" is more consistent with other
> keyword usage: "if (foo)", "for (foo)", "while (foo)",
> "switch (foo)".
OTOH, our style doesn't recommend parentheses after "case" and type names;
indeed,
int (i);
extern char (j);
case ('1'):
looks ugly despite being perfectly legal (at least from GCC's POV).
Sincerely, Dmitry
--
Atlantis ISP, System Administrator
e-mail: dmitry at atlantis.dp.ua
nic-hdl: LYNX-RIPE
More information about the freebsd-current
mailing list