wildmatch: make wildmatch's return value compatible with fnmatch
[git/git.git] / test-wildmatch.c
index ac56420..77014e9 100644 (file)
@@ -4,9 +4,9 @@
 int main(int argc, char **argv)
 {
        if (!strcmp(argv[1], "wildmatch"))
-               return wildmatch(argv[3], argv[2]) ? 0 : 1;
+               return !!wildmatch(argv[3], argv[2]);
        else if (!strcmp(argv[1], "iwildmatch"))
-               return iwildmatch(argv[3], argv[2]) ? 0 : 1;
+               return !!iwildmatch(argv[3], argv[2]);
        else if (!strcmp(argv[1], "fnmatch"))
                return !!fnmatch(argv[3], argv[2], FNM_PATHNAME);
        else