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

2018-02-05 Thread Kurt Roeckx
On Mon, Feb 05, 2018 at 08:43:04PM +0100, Dr. Matthias St. Pierre wrote: > > > 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 w

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

2018-02-05 Thread Paul Dale
> Arguments inside macro expansions should be parenthesized. >     #define foo(a, b)  ((a) + (b)) Except when token concatenating a ## b and stringifying # a. As an aside, should there be spaces on either size of the ## concatenator? The current code mostly doesn't -- which means it

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

2018-02-05 Thread Salz, Rich
* nit: Do not put a space after sizeof. fixed. * 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? It already says that. ___ openssl-project mailing li

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

2018-02-05 Thread Matt Caswell
On 05/02/18 19:43, Dr. Matthias St. Pierre wrote: > > 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? That's already in the style guide: Do not unnecessarily use braces around a single statement:

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

2018-02-05 Thread Dr. Matthias St. Pierre
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()) { > >

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

2018-02-05 Thread Salz, Rich
➢ In general we should prefer ossl_assert over assert. Never use OPENSSL_assert() in libcrypto or libssl. Maybe that’s all to put into the guide, then. ___ openssl-project mailing list openssl-project@openssl.org https://mta.openssl.org/mailman/lis

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

2018-02-05 Thread Matt Caswell
On 05/02/18 18:13, Salz, Rich wrote: > Use ossl_assert, not assert.  Do not forget to handle the error > condition as asserts are not compiled into production code. It's slightly more nuanced than that. There are occasions where assert is ok, e.g. switch(my_expression) { case 1: /* do

[openssl-project] FW: CT Order Confirmation - OPENSSL SOFTWARE SERVICES INC.

2018-02-05 Thread Salz, Rich
I filed the annual registration for OpenSSL Software Services and paid with the OpenSSL credit card. From: CT Corporation Reply-To: "[DO NOT REPLY] CT Corporation" Date: Monday, February 5, 2018 at 1:32 PM To: "rs...@openssl.org" Subject: CT Order Confirmation - OPENSSL SOFTWARE SERVICES INC.

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

2018-02-05 Thread Salz, Rich
A summary of the discussion thread so far. Not surprisingly, it’s all about the whitespace. :) The descriptions here were written to be understandable stand-alone. Once we come to a conclusion, we’ll wordsmith them into the coding style. Do not put a size after sizeof; do use parens. When br