Re: [PATCH] memmem.c and strstr.c: do not require -std=c99

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1TyVUACgkQ9TYGna5E
T6BZfRAAkGY9K7TB+dtgtTacA4qCj+d/WsYl9VbpBHJYNFkCQMAH5NsV3YN7k6qx
nw+k91vy3TlRaLJK7+50gDIaY1ovN9uEr7oOv8CuraNu1DbXhE1uCQVuk0LEc4ej
59R/VcNq6MlVj4aI2VsZU72+GlGtzNUMceOsJfqmP1cNj4CcsFTggfl0RVTzGi23
E1+t32Ief1CJnO1+CijTYheyE0mNN1UhFYrTlq11p59coNA27iP7sJS3NaN1nYWp
d2yH3uySdunYkGyKWNy2QEs0EqT9FSj7XZjbDSj/Y1tNUcXy81DYnE6dHR2J32ZC
ORP0D5tRVj/GmakSgCed54lpFaP3bJlvO8Ft+KkT7kbC5e363r6OFpyOIvPvPbdR
KLMRJIOb9+4S+CCBHV7NDdhyq59WG78Lo5q3D+gG9SjFeoqWiA+Mknjg66TdjUZo
cVH2ULGD1KOvJufUkEF7aOTOPvm+W8RBhvP+32VAiIQIPFwMRGVP2ly4sOLGQEU5
/u7Ji+G7/1zOqDUnC4d7GjWzqQXp7rWuv0c3+4n8gDtYo+Yk63ngo3E0jxzM7W8T
WFuDZJb2HFJJFG1P2+B48S5OPFDMn/ZP4LO3giP/5F6NhrC32wMOF5Cn6nligI6V
Yygh1e12e35IdF+ALDdXIHEs9rQmdSzIGu9hanERSPpmChMpAtY=
=Ehhh
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.