[coreboot] Proposing a change to Coding Style

ron minnich rminnich at gmail.com
Thu May 17 00:21:51 CEST 2018


I like your proposal for a one line else

On Wed, May 16, 2018 at 3:20 PM Felix Held <felix-coreboot at felixheld.de>
wrote:

> Hi!
>
> > I hereby propose that
> > going forward, we should always wrap conditional blocks in braces, even
> > one-liners.
>
> I'd also like to have this change, since it might prevent bugs and
> doesn't add too much verbosity.
>
> Related question: Should the else line in if else statements look like
> this:
>
> } else {
>
> The else won't start in the same column as the corresponding if, but
> this would save one line compared to having the closing curly brace on
> one line and the else on the next one.
>
> Regards
> Felix
>
> --
> coreboot mailing list: coreboot at coreboot.org
> https://mail.coreboot.org/mailman/listinfo/coreboot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot/attachments/20180516/7a5532a8/attachment.html>


More information about the coreboot mailing list