<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Le 16 mai 2018 à 17:15, Patrick Georgi via coreboot <<a href="mailto:coreboot@coreboot.org" class="">coreboot@coreboot.org</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi everybody,<br class=""><br class="">after just running into an issue on the EC code base, I hereby propose that<br class="">going forward, we should always wrap conditional blocks in braces, even<br class="">one-liners.<br class="">That is:<br class=""><br class="">if (foo) {<br class="">   bar();<br class="">}<br class=""><br class="">instead of<br class=""><br class="">if (foo)<br class="">   bar();<br class=""><br class="">It doesn't hurt too much but saves us from accidentally adding baz() after<br class="">bar(), forgetting to add the - now required - braces. If we get rough<br class="">consensus over this, I'd change Coding_Style to match.<br class=""><br class=""><br class="">Thoughts?<br class="">Patrick<br class="">-- <br class="">Google Germany GmbH, ABC-Str. 19, 20354 Hamburg<br class="">Registergericht und -nummer: Hamburg, HRB 86891, Sitz der Gesellschaft:<br class="">Hamburg<br class="">Geschäftsführer: Paul Manicle, Halimah DeLaine Prado<br class=""><br class="">-- <br class="">coreboot mailing list: <a href="mailto:coreboot@coreboot.org" class="">coreboot@coreboot.org</a><br class=""><a href="https://mail.coreboot.org/mailman/listinfo/coreboot" class="">https://mail.coreboot.org/mailman/listinfo/coreboot</a></div></div></blockquote><br class=""></div><div>Hello everyone,</div><div><br class=""></div><div>Not that my opinion matter most (I’m just a newbie after all) but:</div><div class=""><br class=""></div><div class="">I really like this proposal. And agree that this is error prone. I also like the </div><div class="">} else { option.</div><div class=""><br class=""></div><div class="">Remember that the script that check commits is enforcing removing the braces,</div><div class="">I was hit by that when porting the code for denverton.</div><div class="">As a side note, There is also a 80 column limit, I was told that printf format </div><div class="">string can exceed the limit but the script complains…</div><div class=""><br class=""></div><div class="">Just saying that the script should be updated if the policy is changed.</div><div class=""><br class=""></div><div class="">Best Regards</div><div class=""><br class=""></div><div class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">--</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Julien Viard de Galbert - <a href="mailto:jviarddegalbert@online.net" class="">jviarddegalbert@online.net</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Online / Scaleway<br class="">Looking for an amazing job? Join us NOW ! <a href="https://careers.scaleway.com/" class="">https://careers.scaleway.com/</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>