Permalink
Browse files

Fix matching test name to correctly check a test name terminator.

  • Loading branch information...
1 parent 5575bbe commit a2576a7428397690d890e7a7a010ba2db8fc6906 @ggcueroad ggcueroad committed Oct 10, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 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;
}

0 comments on commit a2576a7

Please sign in to comment.