]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
tag ossl_assert not failing as being 'likely' to improve optimisation
authorPauli <pauli@openssl.org>
Wed, 25 Oct 2023 23:58:11 +0000 (10:58 +1100)
committerMatt Caswell <matt@openssl.org>
Thu, 2 Nov 2023 11:08:43 +0000 (11:08 +0000)
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22516)

include/internal/common.h

index 15666f11108c8c92eda92604ea33f6e21446a572..a9e3b7a729d2ea3c3594b6106cc295f56512f21c 100644 (file)
@@ -38,7 +38,7 @@
 # endif
 
 # ifdef NDEBUG
-#  define ossl_assert(x) ((x) != 0)
+#  define ossl_assert(x) likely((x) != 0)
 # else
 __owur static ossl_inline int ossl_assert_int(int expr, const char *exprstr,
                                               const char *file, int line)