summaryrefslogtreecommitdiffstats
path: root/crypto/store/store_strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/store/store_strings.c')
-rw-r--r--crypto/store/store_strings.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/store/store_strings.c b/crypto/store/store_strings.c
index 3d4a8ea730..f9fbd61806 100644
--- a/crypto/store/store_strings.c
+++ b/crypto/store/store_strings.c
@@ -9,6 +9,8 @@
#include <openssl/store.h>
+#include "internal/nelem.h"
+
static char *type_strings[] = {
"Name", /* OSSL_STORE_INFO_NAME */
"Parameters", /* OSSL_STORE_INFO_PARAMS */
@@ -20,7 +22,7 @@ static char *type_strings[] = {
const char *OSSL_STORE_INFO_type_string(int type)
{
- int types = sizeof(type_strings) / sizeof(type_strings[0]);
+ int types = OSSL_NELEM(type_strings);
if (type < 1 || type > types)
return NULL;