git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Michael Haggerty <mhagger@alum.mit.edu>
Subject: [PATCH] cache_tree_find(): remove redundant check in while condition
Date: Mon,  3 Mar 2014 17:08:05 +0100	[thread overview]
Message-ID: <1393862885-23271-1-git-send-email-mhagger@alum.mit.edu> (raw)

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
---
A trivial little cleanup.

 cache-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cache-tree.c b/cache-tree.c
index 0bbec43..7f63c23 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -565,7 +565,7 @@ static struct cache_tree *cache_tree_find(struct cache_tree *it, const char *pat
 			return NULL;
 		it = sub->cache_tree;
 		if (slash)
-			while (*slash && *slash == '/')
+			while (*slash == '/')
 				slash++;
 		if (!slash || !*slash)
 			return it; /* prefix ended with slashes */
-- 
1.9.0

             reply	other threads:[~2014-03-03 16:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 16:08 Michael Haggerty [this message]
2014-03-03 16:32 ` [PATCH] cache_tree_find(): remove redundant check in while condition David Kastrup
2014-03-03 17:07   ` Michael Haggerty
2014-03-03 17:25     ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393862885-23271-1-git-send-email-mhagger@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).