about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--sysdeps/generic/memmem.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b99c3a82d7..c8254668ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/sysdeps/generic/memmem.c b/sysdeps/generic/memmem.c
index 482ab6aa0b..9e32f517b3 100644
--- a/sysdeps/generic/memmem.c
+++ b/sysdeps/generic/memmem.c
@@ -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] &&