diff options
Diffstat (limited to 'stdio-common/tst-fphex.c')
-rw-r--r-- | stdio-common/tst-fphex.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/stdio-common/tst-fphex.c b/stdio-common/tst-fphex.c index c2e8961..efba482 100644 --- a/stdio-common/tst-fphex.c +++ b/stdio-common/tst-fphex.c @@ -1,5 +1,6 @@ /* Test program for %a printf formats. */ +#include <array_length.h> #include <stdio.h> #include <string.h> @@ -49,12 +50,10 @@ do_test (void) const struct testcase *t; int result = 0; - for (t = testcases; - t < &testcases[sizeof testcases / sizeof testcases[0]]; - ++t) + for (t = testcases; t < array_end (testcases); ++t) { CHAR_T buf[1024]; - int n = SPRINT (buf, sizeof buf / sizeof (buf[0]), t->fmt, t->value); + int n = SPRINT (buf, array_length (buf), t->fmt, t->value); if (n != STR_LEN (t->expect) || STR_CMP (buf, t->expect) != 0) { PRINT (L_("" S "\tExpected \"" S "\" (%Zu)\n\tGot \"" |