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

[PATCH] Active_nr is unsigned, hence can't be < 0

From
Pierre Habouzit <madcoder@debian.org>
Date
Jun 7, 2007, 20:44 UTC
Message-ID
<118124910076-git-send-email-madcoder@debian.org>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 sha1_name.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/sha1_name.c b/sha1_name.c
index 7df01af..858f08c 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -682,8 +682,6 @@ int get_sha1_with_mode(const char *name, unsigned char *sha1, unsigned *mode)
 		namelen = namelen - (cp - name);
 		if (!active_cache)
 			read_cache();
-		if (active_nr < 0)
-			return -1;
 		pos = cache_name_pos(cp, namelen);
 		if (pos < 0)
 			pos = -pos - 1;
-- 
1.5.2.1
Next: Pierre Habouzit
Message 1 of 2 in “Active_nr is unsigned, hence can't be < 0”
  1. Active_nr is unsigned, hence can't be < 0Pierre Habouzit, Jun 7, 2007
  2. Missing statics.Pierre Habouzit, Jun 7, 2007

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.