This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: glibc 2.18 stdio-common/tst-long-dbl-fphex.c
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Olivier Langlois <olivier at olivierlanglois dot net>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 24 Sep 2013 16:13:07 -0700 (PDT)
- Subject: Re: glibc 2.18 stdio-common/tst-long-dbl-fphex.c
- Authentication-results: sourceware.org; auth=none
- References: <1379390695 dot 1849 dot 30 dot camel at Wailaba2>
Committed:
2013-09-24 Olivier Langlois <olivier@olivierlanglois.net>
* stdio-common/tst-long-dbl-fphex.c (do_test): Fix swprintf length
argument calculation.
--- 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. */