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 /crypto | |
parent | 59ef580a14a526f6dd8d86b632d67022976fabcd (diff) | |
download | openssl-bdcb1a2cf553166edec0509f4bf3cd36fc964024.tar.gz |
more OSSL_NELEM cases
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/cryptlib.c | 4 | ||||
-rw-r--r-- | crypto/x509v3/ext_dat.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index be4cdb0b20..3742ff2947 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -406,8 +406,8 @@ void OPENSSL_showfatal(const char *fmta, ...) } while (0); va_start(ap, fmta); - _vsntprintf(buf, sizeof(buf) / sizeof(TCHAR) - 1, fmt, ap); - buf[sizeof(buf) / sizeof(TCHAR) - 1] = _T('\0'); + _vsntprintf(buf, OSSL_NELEM(buf) - 1, fmt, ap); + buf[OSSL_NELEM(buf) - 1] = _T('\0'); va_end(ap); # if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333 diff --git a/crypto/x509v3/ext_dat.h b/crypto/x509v3/ext_dat.h index 4e0fe92ffc..d43c86c65f 100644 --- a/crypto/x509v3/ext_dat.h +++ b/crypto/x509v3/ext_dat.h @@ -131,4 +131,4 @@ static const X509V3_EXT_METHOD *standard_exts[] = { /* Number of standard extensions */ -#define STANDARD_EXTENSION_COUNT (sizeof(standard_exts)/sizeof(X509V3_EXT_METHOD *)) +#define STANDARD_EXTENSION_COUNT OSSL_NELEM(standard_exts) |