1998-01-30 22:37  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/generic/memmem.c: Correct last change.
This commit is contained in:
Ulrich Drepper 1998-01-30 13:40:43 +00:00
parent 9931ba2412
commit 9aae565a56
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
1998-01-30 22:37 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/memmem.c: Correct last change.
1998-01-30 22:12 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/Makefile [$(subdir)==nis]: Define

View File

@ -36,7 +36,7 @@ memmem (haystack, haystack_len, needle, needle_len)
if (needle_len == 0)
/* The first occurrence of the empty string is deemed to occur at
the beginning of the string. */
return (void *) &((const char *) haystack);
return (void *) haystack;
for (begin = (const char *) haystack; begin <= last_possible; ++begin)
if (begin[0] == ((const char *) needle)[0] &&