Add parentheses around macro argument of OSSL_NELEM.
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 26 Mar 2017 21:29:41 +0000 (23:29 +0200)
committerRich Salz <rsalz@openssl.org>
Tue, 20 Jun 2017 17:49:43 +0000 (13:49 -0400)
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3039)

e_os.h

diff --git a/e_os.h b/e_os.h
index 49a0c3ed181c22e426f3399c1e9efd747a5f73d7..d331044eadaf01dae18821bd95c8f4edc6d8a71e 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -539,7 +539,7 @@ struct servent *getservbyname(const char *name, const char *proto);
 # endif
 /* end vxworks */
 
-#define OSSL_NELEM(x)    (sizeof(x)/sizeof(x[0]))
+#define OSSL_NELEM(x)    (sizeof(x)/sizeof((x)[0]))
 
 #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
 # define CRYPTO_memcmp memcmp