/* This file is part of the GNU C Library.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
- Contributed by Marek Polacek <polacek@redhat.com>, 2012.
+ Copyright (C) 2012-2024 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
+#include <array_length.h>
#include <wchar.h>
/* Prototype for our test function. */
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. */