[openssl-project] Style guide update -- summary so far

Dr. Matthias St. Pierre Matthias.St.Pierre at ncp-e.com
Mon Feb 5 19:43:04 UTC 2018



Am 05.02.2018 um 19:13 schrieb Salz, Rich:
>  
>
> Do not put a size after sizeof; do use parens.
>

nit: Do not put a /space /after sizeof.

>  
>
> Treat a single-statement with comment as if it were multi-line and use
> curly braces
>
>  
>
>                 if (test()) {
>
>                     /* already alerted */
>
>                     close();
>
>                 }
>
>  
>

Wasn't there also the suggestion by someone that if one part of an
if-else statements needs braces that the other part should get some, too?

    if (foo)
        do_this();
    else
        do_that();

vs.

    if (foo) {
        /* some statements */
        ...
    } else {
        ...
    }


Matthias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-project/attachments/20180205/584bba4a/attachment.html>


More information about the openssl-project mailing list