]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - stdio-common/tst-long-dbl-fphex.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / stdio-common / tst-long-dbl-fphex.c
index d879c98e889f8896f58b181feddeea5523788e41..33dc73190d1e897fcdb9966e8b2262fdbb2dce8c 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the GNU C Library.
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012-2018 Free Software Foundation, Inc.
    Contributed by Marek Polacek <polacek@redhat.com>, 2012.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -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), 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.  */