C99: Suggestions for style(9)
Christoph Mallon
christoph.mallon at gmx.de
Fri May 1 20:42:04 UTC 2009
Julian Elischer schrieb:
> Christoph Mallon wrote:
>
>>
>> You are mistaken. Re-read the "if": It already contains a "return;" as
>> then-part. The declaration of "bp" has no relation to the "if".
>> In fact this is very good: "bp" can only be used after the "if",
>> because it is declared after it. Further, it most probably is only
>> assigned a value once, so declaration and the signle assignment are in
>> the same place, which aids readability and makes the code more concise.
>
> the fact that people misread it allows me to say
>
> "the defense rests m'lord"
Non sequitur. Warner wrote the "return;" in the same line as the if,
which easily hides it. If the "return;" wasn't there, the original
statement would be almost correct - actually it would be a compile
error, because if (x) int i; is not allowed[1].
Christoph
[1] if (x) { int i; } is allowed, of course.
More information about the freebsd-hackers
mailing list