diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-05-03 17:32:05 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-05-04 13:03:49 +0100 |
commit | bdcb1a2cf553166edec0509f4bf3cd36fc964024 (patch) | |
tree | 74df1971edbcdcfc448128d33ace8583eb10ff8b /apps | |
parent | 59ef580a14a526f6dd8d86b632d67022976fabcd (diff) | |
download | openssl-bdcb1a2cf553166edec0509f4bf3cd36fc964024.zip openssl-bdcb1a2cf553166edec0509f4bf3cd36fc964024.tar.gz openssl-bdcb1a2cf553166edec0509f4bf3cd36fc964024.tar.bz2 |
more OSSL_NELEM cases
Reviewed-by: Tim Hudson <tjh@openssl.org>
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; |