]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix latent bug in strstr.c testcase.
authorJames E Wilson <wilson@specifixinc.com>
Tue, 25 Jan 2005 04:54:55 +0000 (04:54 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 25 Jan 2005 04:54:55 +0000 (20:54 -0800)
* gcc.c-torture/execute/builtins/lib/strstr.c (strstr): Correct exit
test for successful match.

From-SVN: r94204

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

index 537cd207eeb8a107e37fe05e77dffd160658670f..cd0415ae568cdd6ae6452da7434b5c4970c475d9 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 fa43c93431298e803e8c674b8f9b1311027dd573..737a48f63dcdb935338b4fc816c49d2fb1ae9f41 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;