OSDN Git Service

Fix latent bug in strstr.c testcase.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Jan 2005 04:54:55 +0000 (04:54 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Jan 2005 04:54:55 +0000 (04:54 +0000)
* gcc.c-torture/execute/builtins/lib/strstr.c (strstr): Correct exit
test for successful match.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94204 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/builtins/lib/strstr.c

index 537cd20..cd0415a 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-24  James E Wilson  <wilson@specifixinc.com>
+
+       * gcc.c-torture/execute/builtins/lib/strstr.c (strstr): Correct exit
+       test for successful match.
+
 2005-01-25  Alexander Malmberg  <alexander@malmberg.org>
 
        PR objc/18408
index fa43c93..737a48f 100644 (file)
@@ -20,7 +20,7 @@ strstr(const char *s1, const char *s2)
            break;
          p++, q++;
        }
-      if (*p == *q && *p == 0)
+      if (*q == 0)
        return (char *)s1;
     }
   return 0;