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

[PATCH 2/2] [GSOC] show_bisect_vars(): Use unsigned int instead of signed int for flags

From
RSRobert Stanca <robert.stanca7@gmail.com>
Date
Apr 1, 2017, 15:30 UTC
Message-ID
<20170401153049.21400-2-robert.stanca7@gmail.com>
In-Reply-To
<20170401153049.21400-1-robert.stanca7@gmail.com>
 As rev_list_info's flag is unsigned int , var flags should have proper type.Also var cnt could be unsigned as there's no negative number of commits (all-reaches)
Signed-off-by: Robert Stanca <robert.stanca7@gmail.com>
---
 builtin/rev-list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 0aa93d589..eb4af53ab 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -211,7 +211,7 @@ static void print_var_int(const char *var, int val)
 
 static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
 {
-	int cnt, flags = info->flags;
+	unsigned int cnt, flags = info->flags;
 	char hex[GIT_SHA1_HEXSZ + 1] = "";
 	struct commit_list *tried;
 	struct rev_info *revs = info->revs;
-- 
2.12.2.575.gb14f27f91.dirty
Previous: Robert StancaNext: Junio C Hamano
Message 2 of 9 in “[GSOC] Convert signed flags to unsigned”
  1. 1/2 [GSOC] Convert signed flags to unsignedRobert Stanca, Apr 1, 2017
  2. 2/2 [GSOC] show_bisect_vars(): Use unsigned int instead of signed int for flagsRobert Stanca, Apr 1, 2017
  3. Junio C HamanoApr 1, 2017
  4. Robert StancaApr 1, 2017
  5. Junio C HamanoApr 2, 2017
  6. Robert StancaApr 2, 2017
  7. Junio C HamanoApr 2, 2017
  8. Junio C HamanoApr 1, 2017
  9. Robert StancaApr 1, 2017

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.