[coreboot] Proposing a change to Coding Style
Paul Menzel
paulepanter at users.sourceforge.net
Sat May 19 10:50:45 CEST 2018
Dear Patrick,
Am Mittwoch, den 16.05.2018, 17:15 +0200 schrieb Patrick Georgi:
> 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.
>
> Thoughts?
Just to clarify, as it is *should* both styles are allowed, or the new
style *must* be used going forward?
The reason I ask is, that being compatible with the Linux kernel is a
good goal to be able to copy code around.
Kind regards,
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://mail.coreboot.org/pipermail/coreboot/attachments/20180519/01f19d55/attachment.asc>
More information about the coreboot
mailing list