summaryrefslogtreecommitdiff
path: root/test/constant_time_test.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-05-03 17:32:05 +0100
committerDr. Stephen Henson <steve@openssl.org>2015-05-04 13:03:49 +0100
commitbdcb1a2cf553166edec0509f4bf3cd36fc964024 (patch)
tree74df1971edbcdcfc448128d33ace8583eb10ff8b /test/constant_time_test.c
parent59ef580a14a526f6dd8d86b632d67022976fabcd (diff)
downloadopenssl-new-bdcb1a2cf553166edec0509f4bf3cd36fc964024.tar.gz
more OSSL_NELEM cases
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'test/constant_time_test.c')
-rw-r--r--test/constant_time_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/constant_time_test.c b/test/constant_time_test.c
index d313d0c7a9..bdb270209e 100644
--- a/test/constant_time_test.c
+++ b/test/constant_time_test.c
@@ -231,12 +231,12 @@ int main(int argc, char *argv[])
int num_failed = 0, num_all = 0;
fprintf(stdout, "Testing constant time operations...\n");
- for (i = 0; i < sizeof(test_values) / sizeof(int); ++i) {
+ for (i = 0; i < OSSL_NELEM(test_values); ++i) {
a = test_values[i];
num_failed += test_is_zero(a);
num_failed += test_is_zero_8(a);
num_all += 2;
- for (j = 0; j < sizeof(test_values) / sizeof(int); ++j) {
+ for (j = 0; j < OSSL_NELEM(test_values); ++j) {
b = test_values[j];
num_failed += test_binary_op(&constant_time_lt,
"constant_time_lt", a, b, a < b);
@@ -274,9 +274,9 @@ int main(int argc, char *argv[])
}
}
- for (i = 0; i < sizeof(signed_test_values) / sizeof(int); ++i) {
+ for (i = 0; i < OSSL_NELEM(signed_test_values); ++i) {
c = signed_test_values[i];
- for (j = 0; j < sizeof(signed_test_values) / sizeof(int); ++j) {
+ for (j = 0; j < OSSL_NELEM(signed_test_values); ++j) {
d = signed_test_values[j];
num_failed += test_select_int(c, d);
num_failed += test_eq_int(c, d);