1
0
mirror of https://github.com/git/git.git synced 2024-09-21 09:42:22 +02:00

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>
This commit is contained in:
Michael Haggerty 2014-03-05 18:26:28 +01:00 committed by Junio C Hamano
parent 79192b87ad
commit 03b0403b4a

View 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 */