git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] cache_tree_find(): remove redundant check in while condition

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Mar 3, 2014, 16:08 UTC
Message-ID
<1393862885-23271-1-git-send-email-mhagger@alum.mit.edu>
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
Next: David Kastrup
Message 1 of 4 in “cache_tree_find(): remove redundant check in while condition”
  1. cache_tree_find(): remove redundant check in while conditionMichael Haggerty, Mar 3, 2014
  2. David KastrupMar 3, 2014
  3. Michael HaggertyMar 3, 2014
  4. David KastrupMar 3, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.