summaryrefslogtreecommitdiff
path: root/stdio-common/tst-long-dbl-fphex.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-11-02 12:14:51 +0100
committerFlorian Weimer <fweimer@redhat.com>2017-11-02 12:45:20 +0100
commitd10b132bf5393e648a1c64569746c8e886d50702 (patch)
tree66a444574feee728a133c754c9527c02fe25e249 /stdio-common/tst-long-dbl-fphex.c
parentc94a5688fb1228a862b2d4a3f1239cdc0e3349e5 (diff)
stdio-common: Use array_length and array_end macros
Diffstat (limited to 'stdio-common/tst-long-dbl-fphex.c')
-rw-r--r--stdio-common/tst-long-dbl-fphex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/stdio-common/tst-long-dbl-fphex.c b/stdio-common/tst-long-dbl-fphex.c
index 1170c74c4c..6a402a1c89 100644
--- a/stdio-common/tst-long-dbl-fphex.c
+++ b/stdio-common/tst-long-dbl-fphex.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 <wchar.h>
/* Prototype for our test function. */
@@ -28,9 +29,9 @@ do_test (void)
int result = 0;
const long double x = 24.5;
wchar_t a[16];
- swprintf (a, sizeof a / sizeof a[0], L"%La\n", x);
+ swprintf (a, array_length (a), L"%La\n", x);
wchar_t A[16];
- swprintf (A, sizeof A / sizeof A[0], L"%LA\n", x);
+ swprintf (A, array_length (a), L"%LA\n", x);
/* Here wprintf can return four valid variants. We must accept all
of them. */