aboutsummaryrefslogtreecommitdiff
path: root/stdio-common/tst-long-dbl-fphex.c
diff options
context:
space:
mode:
authorOlivier Langlois <olivier@olivierlanglois.net>2013-09-24 16:12:12 -0700
committerRoland McGrath <roland@hack.frob.com>2013-09-24 16:12:12 -0700
commit12c22bc4e3bdc9fdf493a75cc6fe06ffb9fa47a4 (patch)
treefbee460806220d6a2de7ac9e9f871d5194b22c9e /stdio-common/tst-long-dbl-fphex.c
parenta03d8ea77f9b8292efb8f8fc49a573c637124e49 (diff)
downloadglibc-12c22bc4e3bdc9fdf493a75cc6fe06ffb9fa47a4.zip
glibc-12c22bc4e3bdc9fdf493a75cc6fe06ffb9fa47a4.tar.gz
glibc-12c22bc4e3bdc9fdf493a75cc6fe06ffb9fa47a4.tar.bz2
Fix tst-long-dbl-fphex swprintf length calculation.
Diffstat (limited to 'stdio-common/tst-long-dbl-fphex.c')
-rw-r--r--stdio-common/tst-long-dbl-fphex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stdio-common/tst-long-dbl-fphex.c b/stdio-common/tst-long-dbl-fphex.c
index 0be80ca..a406a71 100644
--- a/stdio-common/tst-long-dbl-fphex.c
+++ b/stdio-common/tst-long-dbl-fphex.c
@@ -28,9 +28,9 @@ do_test (void)
int result = 0;
const long double x = 24.5;
wchar_t a[16];
- swprintf (a, sizeof (a), L"%La\n", x);
+ swprintf (a, sizeof a / sizeof a[0], L"%La\n", x);
wchar_t A[16];
- swprintf (A, sizeof (A) / sizeof (A[0]), L"%LA\n", x);
+ swprintf (A, sizeof A / sizeof A[0], L"%LA\n", x);
/* Here wprintf can return four valid variants. We must accept all
of them. */