Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15
DORMANTno replies

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

From: Pierre Habouzit <hidden>
Date: 2016-06-15 22:43:14
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Pierre Habouzit <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help