cache_tree_find(): remove redundant check
authorMichael Haggerty <mhagger@alum.mit.edu>
Wed, 5 Mar 2014 17:26:28 +0000 (18:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Mar 2014 20:33:53 +0000 (12:33 -0800)
If *slash == '/', then it is necessarily non-NUL.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache-tree.c
index 408ee57a5070d9ec307723cb17493fceb9b4b28b..39ad8c99418b163857611c2de69b029abadb6237 100644 (file)
@@ -563,7 +563,7 @@ static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *pat
                if (!sub)
                        return NULL;
                it = sub->cache_tree;
-               while (*slash && *slash == '/')
+               while (*slash == '/')
                        slash++;
                if (!*slash)
                        return it; /* prefix ended with slashes */