This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Aug 13 02:00, Giacomo Tesio wrote: > --- > newlib/libc/string/memmem.c | 3 ++- > newlib/libc/string/strstr.c | 12 ++++++++---- > 2 files changed, 10 insertions(+), 5 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; > [...] Pushed. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer Red Hat
Attachment:
signature.asc
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |