On 13.02.2011 17:44, Daniel Shahaf wrote:
> Branko Čibej wrote on Sun, Feb 13, 2011 at 16:10:03 +0100:
>> On 13.02.2011 09:33, Daniel Shahaf wrote:
>>>> +    strncpy(orig_lc_all, setlocale(LC_ALL, NULL), sizeof orig_lc_all);
>>> sizeof() with parens please.
>> Why? They're not necessary unless the sizeof operator (not function!) is
>> applied to a type name. There's no ambiguity here at all.
> For the same reason that parens would be used in 'foo || bar && baz',
> even though there's no ambiguity there either.

Actually this case is quite different. If you put parens there, I'd have
to spend time figuring out that orig_lc_all is a variable, not a type
name. Without the parens, the answer is obvious.

-- Brane

Reply via email to