diff options
author | Giacomo Tesio <giacomo@tesio.it> | 2019-08-13 02:00:07 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2019-08-14 10:39:37 +0200 |
commit | 6aaaa2e768358f2362b67d9bbd4b7b5ce5513a35 (patch) | |
tree | ec6cbfa4f1bd44615d48f8a23c3bf939184c3779 /newlib/libc/string/memmem.c | |
parent | 8922b85d6bb5072441468ea24e764a825b9e1d9f (diff) | |
download | cygnal-6aaaa2e768358f2362b67d9bbd4b7b5ce5513a35.tar.gz cygnal-6aaaa2e768358f2362b67d9bbd4b7b5ce5513a35.tar.bz2 cygnal-6aaaa2e768358f2362b67d9bbd4b7b5ce5513a35.zip |
memmem.c and strstr.c: do not require -std=c99
Diffstat (limited to 'newlib/libc/string/memmem.c')
-rw-r--r-- | newlib/libc/string/memmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/string/memmem.c b/newlib/libc/string/memmem.c index 55d2459aa..65267b9c5 100644 --- a/newlib/libc/string/memmem.c +++ b/newlib/libc/string/memmem.c @@ -143,10 +143,11 @@ memmem (const void *haystack, size_t hs_len, const void *needle, size_t ne_len) size_t tmp, shift1; size_t m1 = ne_len - 1; size_t offset = 0; + int i; /* Initialize bad character shift hash table. */ memset (shift, 0, sizeof (shift)); - for (int i = 1; i < m1; i++) + for (i = 1; i < m1; i++) shift[hash2 (ne + i)] = i; shift1 = m1 - shift[hash2 (ne + m1)]; shift[hash2 (ne + m1)] = m1; |