diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:50 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:50 +0100 |
| commit | ff33e1d252f46bec1a33e28700da3282fc24047a (patch) | |
| tree | 5c15bc695be820b393a8496c5807ecafbbdeb89b /tests/unistr/test-u-strstr.h | |
| parent | b2ac982cc8b5290699eb5f52fb043d3d15e2624b (diff) | |
| parent | 5f59a34ab747dde8ede7357f3431bf06bd6002fe (diff) | |
Update upstream source from tag 'upstream/1.4.2'
Update to upstream version '1.4.2'
with Debian dir 493e96bcd865e4f9990e20bee26408c96231d727
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; |
