summaryrefslogtreecommitdiffstats
path: root/crypto/ts/ts_rsp_print.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-05-02 18:30:00 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-05-03 12:53:08 +0100
commitb6eb9827a6866981c08cc9613ca8b4a648894fb1 (patch)
treec5a6351461d8be964bc1f31fa2e34c4ebb7cfafd /crypto/ts/ts_rsp_print.c
parent31ff45aa975acb43f1da20e714eadf4649655714 (diff)
Add OSSL_NELEM macro.
Add OSSL_NELEM macro to e_os.h to determine the number of elements in an array. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/ts/ts_rsp_print.c')
-rw-r--r--crypto/ts/ts_rsp_print.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/ts/ts_rsp_print.c b/crypto/ts/ts_rsp_print.c
index d64f2f4e4a..0a3e4973c8 100644
--- a/crypto/ts/ts_rsp_print.c
+++ b/crypto/ts/ts_rsp_print.c
@@ -130,8 +130,7 @@ int TS_STATUS_INFO_print_bio(BIO *bio, TS_STATUS_INFO *a)
/* Printing status code. */
BIO_printf(bio, "Status: ");
status = ASN1_INTEGER_get(a->status);
- if (0 <= status
- && status < (long)(sizeof(status_map) / sizeof(status_map[0])))
+ if (0 <= status && status < (long)OSSL_NELEM(status_map))
BIO_printf(bio, "%s\n", status_map[status]);
else
BIO_printf(bio, "out of bounds\n");