summaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-03-05 17:26:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-03-05 20:33:53 (GMT)
commit03b0403b4a957bb52f5266ac071869da32a3be0a (patch)
tree26582dd054e7afad2469674678c446294aff1106 /cache-tree.c
parent79192b87ad6a57e2b2a6219f0a17e85ece759c0f (diff)
downloadgit-03b0403b4a957bb52f5266ac071869da32a3be0a.zip
git-03b0403b4a957bb52f5266ac071869da32a3be0a.tar.gz
git-03b0403b4a957bb52f5266ac071869da32a3be0a.tar.bz2
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>
Diffstat (limited to 'cache-tree.c')
-rw-r--r--cache-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache-tree.c b/cache-tree.c
index 408ee57..39ad8c9 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -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 */