changeset 332:799e38f867da

Use NCOUNT().
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 23 Feb 2016 12:59:28 +0200
parents 6e42d50c08c4
children a705d21ca25b
files tests.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests.c	Tue Feb 23 12:55:45 2016 +0200
+++ b/tests.c	Tue Feb 23 12:59:28 2016 +0200
@@ -309,8 +309,8 @@
         {
             snprintf(buf, sizeof(buf), "%d", i_vals[i1]);
 
-            for (i3 = 0; i3 < sizeof(i_types) / sizeof(i_types[0]); i3++)
-            for (i2 = 0; i2 < sizeof(i_fmts) / sizeof(i_fmts[0]); i2++)
+            for (i3 = 0; i3 < NCOUNT(i_types); i3++)
+            for (i2 = 0; i2 < NCOUNT(i_fmts); i2++)
             {
                 snprintf(buf2, sizeof(buf2), "%s%s", i_fmts[i2], i_types[i3]);
                 test_snprintf(buf, buf2, i_vals[i1]);
@@ -328,8 +328,8 @@
         {
             snprintf(buf, sizeof(buf), "%lld", i_vals[i1]);
 
-            for (i3 = 0; i3 < sizeof(i_types) / sizeof(i_types[0]); i3++)
-            for (i2 = 0; i2 < sizeof(i_fmts) / sizeof(i_fmts[0]); i2++)
+            for (i3 = 0; i3 < NCOUNT(i_types); i3++)
+            for (i2 = 0; i2 < NCOUNT(i_fmts); i2++)
             {
                 snprintf(buf2, sizeof(buf2), "%sll%s", i_fmts[i2], i_types[i3]);
                 test_snprintf(buf, buf2, i_vals[i1]);