[openssl-project] Style guide updates

Bernd Edlinger bernd.edlinger at hotmail.de
Fri Jan 26 13:52:42 UTC 2018


On 01/26/18 14:26, Salz, Rich wrote:
> Some things I think we should add to the style guide.  Let’s discuss here.
> 
> No space after sizeof, use parens.  (But see 
> ssl/record/rec_layer_{d1,s3}.c )
> 
> Multiline conditionals, such as in an if, should be broken before the 
> logical connector and indented an extra tabstop.  For example:
> 
>      while (this_is_true
> 
>                && that_is_not_false) {
> 
>          frobit();
> 
>          more_stuff();
> 
>      }
> 
> When dealing with long lines, try to avoid breaking across a function 
> call. Don’t do this:
> 
>      If (some_long_text && foo(a,
> 
>           b, c) && bar()) {
> 
> Instead do this:
> 
>      If (some_long_text
> 
>          && foo(a, b, c,)
> 
>          && bar())
> 
> What else needs to be updated?
> 

There was some discussion about fully parenthesed macro arguments, a
while ago.

At least at that time the style guide did not cover that topic.


Bernd.


More information about the openssl-project mailing list