[openssl-project] Style guide update -- summary so far
matt at openssl.org
Mon Feb 5 19:05:57 UTC 2018
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.
/* do something */
/* do something else */
assert("Shouldn't get here" == NULL);
In general we should prefer ossl_assert over assert. Never use
OPENSSL_assert() in libcrypto or libssl.
More information about the openssl-project