diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-11-02 12:14:51 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-11-02 12:45:20 +0100 |
commit | d10b132bf5393e648a1c64569746c8e886d50702 (patch) | |
tree | 66a444574feee728a133c754c9527c02fe25e249 /stdio-common/tst-printf-round.c | |
parent | c94a5688fb1228a862b2d4a3f1239cdc0e3349e5 (diff) | |
download | glibc-d10b132bf5393e648a1c64569746c8e886d50702.tar glibc-d10b132bf5393e648a1c64569746c8e886d50702.tar.gz glibc-d10b132bf5393e648a1c64569746c8e886d50702.tar.bz2 glibc-d10b132bf5393e648a1c64569746c8e886d50702.zip |
stdio-common: Use array_length and array_end macros
Diffstat (limited to 'stdio-common/tst-printf-round.c')
-rw-r--r-- | stdio-common/tst-printf-round.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/stdio-common/tst-printf-round.c b/stdio-common/tst-printf-round.c index e0073f2856..a5db3b88c2 100644 --- a/stdio-common/tst-printf-round.c +++ b/stdio-common/tst-printf-round.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#include <array_length.h> #include <fenv.h> #include <stdio.h> #include <string.h> @@ -167,7 +168,7 @@ do_test (void) int save_round_mode __attribute__ ((unused)) = fegetround (); int result = 0; - for (size_t i = 0; i < sizeof (dec_tests) / sizeof (dec_tests[0]); i++) + for (size_t i = 0; i < array_length (dec_tests); i++) { result |= test_dec_in_one_mode (dec_tests[i].d, dec_tests[i].fmt, dec_tests[i].rn, "default rounding mode"); @@ -197,7 +198,7 @@ do_test (void) #endif } - for (size_t i = 0; i < sizeof (hex_tests) / sizeof (hex_tests[0]); i++) + for (size_t i = 0; i < array_length (hex_tests); i++) { result |= test_hex_in_one_mode (hex_tests[i].d, hex_tests[i].fmt, hex_tests[i].rn, "default rounding mode"); |