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:50:27 +0000 (13:50 -0400)
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3039)

(cherry picked from commit 26dc47f3c44c7fb4488d1becaf997737486f4922)

e_os.h

diff --git a/e_os.h b/e_os.h
index 559bf90048dcc6cbbedab99385a87311127f8330..8f52dd47f6f3d5befc8057db70cce8a11d524e79 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -521,7 +521,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  __cplusplus
 }