From: Bruno Haible Date: Wed, 6 Nov 2024 11:34:18 +0000 (+0100) Subject: strncat, wcsncat tests: Fix test. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b8b070c39edc587b79e71395999f5a0f9e283d3a;p=gnulib.git strncat, wcsncat tests: Fix test. * tests/test-strncat.c (main): Change y to a valid string. * tests/test-wcsncat.c (main): Change y to a valid wide string. --- diff --git a/ChangeLog b/ChangeLog index fd4a4db560..43e09219b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-11-06 Bruno Haible + + strncat, wcsncat tests: Fix test. + * tests/test-strncat.c (main): Change y to a valid string. + * tests/test-wcsncat.c (main): Change y to a valid wide string. + 2024-11-05 Paul Eggert eealloc: deprecate diff --git a/tests/test-strncat.c b/tests/test-strncat.c index c4668d95b4..c7fe68227e 100644 --- a/tests/test-strncat.c +++ b/tests/test-strncat.c @@ -69,7 +69,7 @@ main () #endif { - char y[1]; + char y[2] = { 'x', '\0' }; value = (strncat (y, NULL, 0) == y); ASSERT (value); } diff --git a/tests/test-wcsncat.c b/tests/test-wcsncat.c index b8479dfb5e..1b838261f2 100644 --- a/tests/test-wcsncat.c +++ b/tests/test-wcsncat.c @@ -39,7 +39,7 @@ main () #endif { - wchar_t y[1]; + wchar_t y[2] = { L'x', 0 }; value = (wcsncat (y, NULL, 0) == y); ASSERT (value); }