]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - stdio-common/tst-swprintf.c
Prepare vfscanf to use __strtof128_internal
[thirdparty/glibc.git] / stdio-common / tst-swprintf.c
index ce62c6bf685a7022764bd29d6c54eef382615766..07194eb67d672d580d2d8b0a9929df4a0539ade7 100644 (file)
@@ -1,3 +1,4 @@
+#include <array_length.h>
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -16,7 +17,6 @@ static int
 do_test (void)
 {
   wchar_t buf[1000];
-#define nbuf (sizeof (buf) / sizeof (buf[0]))
   int result = 0;
   ssize_t n;
 
@@ -27,7 +27,7 @@ do_test (void)
     }
 
 #define CHECK(fmt, nexp, exp) \
-  n = swprintf (buf, nbuf, fmt, input);                                              \
+  n = swprintf (buf, array_length (buf), fmt, input);                        \
   if (n != nexp)                                                             \
     {                                                                        \
       printf ("swprintf (.., .., L\"%ls\", \"%ls\") return %d, not %d\n",     \