diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-10 13:24:07 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-10 13:24:07 +0100 |
| commit | cfd1f17f1a85d95ea12bca8dae42add7dad1ad11 (patch) | |
| tree | 8016486f8ee7157213f2d09ff2491bfa9c94638a /tests/unistr/test-u-strstr.h | |
| parent | 14e4d584d0121031ec40e6c35869745f1747ff29 (diff) | |
| parent | 1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff) | |
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
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 36783cdf..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-2024 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; |
