On 16.05.2018 17:15, Patrick Georgi via coreboot wrote:
> Hi everybody,
>
> after just running into an issue on the EC code base, I hereby propose that
> going forward, we should always wrap conditional blocks in braces, even
> one-liners.
> That is:
>
> if (foo) {
> bar();
> }
>
> instead of
>
> if (foo)
> bar();
>
> It doesn't hurt too much but saves us from accidentally adding baz() after
> bar(), forgetting to add the - now required - braces. If we get rough
> consensus over this, I'd change Coding_Style to match.
>
+2 as long as we make it clear that we are talking about future code.
Nobody should run around and revise existing code; it's too easy to
"fix" code that is working fine but is badly indented.
Nico
--
coreboot mailing list: [email protected]
https://mail.coreboot.org/mailman/listinfo/coreboot