]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Nit: macro parameters should always be parenthesised in expressions
authorRichard Levitte <levitte@openssl.org>
Fri, 20 Jun 2025 12:29:04 +0000 (14:29 +0200)
committerNeil Horman <nhorman@openssl.org>
Sat, 21 Jun 2025 16:46:01 +0000 (12:46 -0400)
Affected macros: ossl_likely and ossl_unlikely

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27862)

include/internal/common.h

index 0c0415b777bd41bfea1f663794a00e757326b95e..af6d7db6c25cb299a532167a65ab05ffe1e28d93 100644 (file)
@@ -22,8 +22,8 @@
 #  define ossl_likely(x)     __builtin_expect(!!(x), 1)
 #  define ossl_unlikely(x)   __builtin_expect(!!(x), 0)
 # else
-#  define ossl_likely(x)     x
-#  define ossl_unlikely(x)   x
+#  define ossl_likely(x)     (x)
+#  define ossl_unlikely(x)   (x)
 # endif
 
 # if defined(__GNUC__) || defined(__clang__)