Aurelien Jarno <aurel...@aurel32.net> writes:

> Hi all,
>
> I am currently reviewing the S390 patches which extensively use of
> code like:
>
>     if (a == 5) printf("a was 5.\n");
>     else if (a == 6) printf("a was 6.\n");
>     else printf("a was something else entirely.\n");
>
> It is something currently allowed by the CODING_STYLE document (there is
> no "indented statement"), but I am not fully comfortable with it. Should
> we accept such code? Should we fix CODING_STYLE?

In my opinion a line break and indent after the if () should be used
except in the rare cases where keeping it all on a single line
improves readability.

-- 
Måns Rullgård
m...@mansr.com



Reply via email to