From 03b0403b4a957bb52f5266ac071869da32a3be0a Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Wed, 5 Mar 2014 18:26:28 +0100 Subject: [PATCH] cache_tree_find(): remove redundant check If *slash == '/', then it is necessarily non-NUL. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- cache-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache-tree.c b/cache-tree.c index 408ee57a50..39ad8c9941 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 */ -- 2.11.4.GIT