diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:33 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:33 +0100 |
| commit | 5f59a34ab747dde8ede7357f3431bf06bd6002fe (patch) | |
| tree | 056a4477fd870d454d5be5868cddab829a47f4d2 /tests/unistr/test-u-strstr.h | |
| parent | 27dae84ed92f1ef0300263091972338d12e78348 (diff) | |
New upstream version 1.4.2upstream/1.4.2upstream
Diffstat (limited to 'tests/unistr/test-u-strstr.h')
| -rw-r--r-- | tests/unistr/test-u-strstr.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/unistr/test-u-strstr.h b/tests/unistr/test-u-strstr.h index 826089d9..9676072a 100644 --- a/tests/unistr/test-u-strstr.h +++ b/tests/unistr/test-u-strstr.h @@ -1,5 +1,5 @@ /* Test of uN_strstr() functions. - Copyright (C) 2004, 2007-2025 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2026 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -130,10 +130,8 @@ test_u_strstr (void) UNIT *haystack = (UNIT *) malloc ((m + 1) * sizeof (UNIT)); if (haystack != NULL) { - size_t i; - haystack[0] = 'B'; - for (i = 1; i < m; i++) + for (size_t i = 1; i < m; i++) haystack[i] = 'A'; haystack[m] = '\0'; @@ -166,9 +164,7 @@ test_u_strstr (void) UNIT *needle = (UNIT *) malloc ((m + 1) * sizeof (UNIT)); if (needle != NULL) { - size_t i; - - for (i = 0; i < m; i++) + for (size_t i = 0; i < m; i++) needle[i] = 'A'; needle[m] = '\0'; @@ -188,15 +184,14 @@ test_u_strstr (void) UNIT *needle = (UNIT *) malloc ((m + 2) * sizeof (UNIT)); if (haystack != NULL && needle != NULL) { - size_t i; const UNIT *result; - for (i = 0; i < 2 * m; i++) + for (size_t i = 0; i < 2 * m; i++) haystack[i] = 'A'; haystack[2 * m] = 'B'; haystack[2 * m + 1] = 0; - for (i = 0; i < m; i++) + for (size_t i = 0; i < m; i++) needle[i] = 'A'; needle[m] = 'B'; needle[m + 1] = 0; |
