cache_tree_find(): remove early return
There is no need for an early return it; from the loop if slash points at the end of the string, because that is exactly what will happen when the while condition fails at the start of the next iteration. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Mar 5, 2014 at 18:26 UTC
8b7e5f79723b0f2e1d3dca4e959ad2a2041e9453
1 file changed
-2
cache-tree.c
-2
@@ -565,8 +565,6 @@ static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *pat
565
it = sub->cache_tree;
566
while (*slash == '/')
567
slash++;
568
- if (!*slash)
569
- return it; /* prefix ended with slashes */
568
path = slash;
569
}
570
return it;