Skip to content

Commit 03b0403

Browse files
mhaggergitster
authored andcommitted
cache_tree_find(): remove redundant check
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>
1 parent 79192b8 commit 03b0403

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cache-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *pat
563563
if (!sub)
564564
return NULL;
565565
it = sub->cache_tree;
566-
while (*slash && *slash == '/')
566+
while (*slash == '/')
567567
slash++;
568568
if (!*slash)
569569
return it; /* prefix ended with slashes */

0 commit comments

Comments
 (0)