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:

committed by
Junio C Hamano

parent
79192b87ad
commit
03b0403b4a
@ -563,7 +563,7 @@ static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *pat
|
|||||||
if (!sub)
|
if (!sub)
|
||||||
return NULL;
|
return NULL;
|
||||||
it = sub->cache_tree;
|
it = sub->cache_tree;
|
||||||
while (*slash && *slash == '/')
|
while (*slash == '/')
|
||||||
slash++;
|
slash++;
|
||||||
if (!*slash)
|
if (!*slash)
|
||||||
return it; /* prefix ended with slashes */
|
return it; /* prefix ended with slashes */
|
||||||
|
Reference in New Issue
Block a user