diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/apps.c | 2 | ||||
-rw-r--r-- | apps/ca.c | 2 | ||||
-rw-r--r-- | apps/speed.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/apps/apps.c b/apps/apps.c index 1b76dbf..1e2970a 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -2654,7 +2654,7 @@ int app_isdir(const char *name) # if defined(UNICODE) || defined(_UNICODE) size_t i, len_0 = strlen(name) + 1; - if (len_0 > sizeof(FileData.cFileName) / sizeof(FileData.cFileName[0])) + if (len_0 > OSSL_NELEM(FileData.cFileName)) return -1; # if !defined(_WIN32_WCE) || _WIN32_WCE>=101 @@ -2408,7 +2408,7 @@ static const char *crl_reasons[] = { "CAkeyTime" }; -#define NUM_REASONS (sizeof(crl_reasons) / sizeof(char *)) +#define NUM_REASONS OSSL_NELEM(crl_reasons) /* * Given revocation information convert to a DB string. The format of the diff --git a/apps/speed.c b/apps/speed.c index a5bd265..7a69485 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -2438,7 +2438,7 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher) { static int mblengths[] = { 8 * 1024, 2 * 8 * 1024, 4 * 8 * 1024, 8 * 8 * 1024, 8 * 16 * 1024 }; - int j, count, num = sizeof(lengths) / sizeof(lengths[0]); + int j, count, num = OSSL_NELEM(lengths); const char *alg_name; unsigned char *inp, *out, no_key[32], no_iv[16]; EVP_CIPHER_CTX ctx; |