]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix matching test name to correctly check a test name terminator.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 10 Oct 2012 01:11:44 +0000 (10:11 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 10 Oct 2012 01:11:44 +0000 (10:11 +0900)
test_utils/test_utils.c

index 48ab6fbdd57e81be1766900f5c6cff9eb9f5785d..8ea3d3c4b33d56d8f259c2798f460352a5fe7330 100644 (file)
@@ -57,13 +57,12 @@ test_filter(const char *pattern, const char *test)
                                p++;
                        if (p[0] == '\\')
                                p++;
-                       while (p[0] != t[0])
-                               t++;
+                       if ((t = strchr(t, p[0])) == 0)
+                               break;
                }
                if (p[0] != t[0])
                        break;
-               if (p[0] == '\0' && t[0] == '\0')
-               {
+               if (p[0] == '\0') {
                        retval = 1;
                        break;
                }