summaryrefslogtreecommitdiff
path: root/test_utils
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-10-10 10:11:44 +0900
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-10-10 10:11:44 +0900
commita2576a7428397690d890e7a7a010ba2db8fc6906 (patch)
tree3bc953fa101e2db4c164332a4452cb219f592ff0 /test_utils
parent5575bbe0f31bc19cfd014cafa477a504a76209d6 (diff)
downloadlibarchive-a2576a7428397690d890e7a7a010ba2db8fc6906.tar.gz
Fix matching test name to correctly check a test name terminator.
Diffstat (limited to 'test_utils')
-rw-r--r--test_utils/test_utils.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/test_utils/test_utils.c b/test_utils/test_utils.c
index 48ab6fbd..8ea3d3c4 100644
--- a/test_utils/test_utils.c
+++ b/test_utils/test_utils.c
@@ -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;
}