summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f1beb7)
raw | patch | inline | side by side (parent: 9f1beb7)
author | Andy Whitcroft <apw@shadowen.org> | |
Thu, 19 Apr 2007 02:08:15 +0000 (03:08 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 19 Apr 2007 02:26:33 +0000 (19:26 -0700) |
Two scanf() calls were converted to strtoul_ui() but the return
values were not updated to match. scanf() returns the number of
matched "values" which for this usage is 1 on success. strtoul_ui()
return 0 on success. Update these call sites to match.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
values were not updated to match. scanf() returns the number of
matched "values" which for this usage is 1 on success. strtoul_ui()
return 0 on success. Update these call sites to match.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-update-index.c | patch | blob | history | |
convert-objects.c | patch | blob | history |
diff --git a/builtin-update-index.c b/builtin-update-index.c
index 6ed61ebc57e9591edfe00f2e57926df7b790856b..8659800eec055913327192747b3c342e4da462b8 100644 (file)
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
if (i+3 >= argc)
die("git-update-index: --cacheinfo <mode> <sha1> <path>");
- if ((strtoul_ui(argv[i+1], 8, &mode) != 1) ||
+ if (strtoul_ui(argv[i+1], 8, &mode) ||
get_sha1_hex(argv[i+2], sha1) ||
add_cacheinfo(mode, sha1, argv[i+3], 0))
die("git-update-index: --cacheinfo"
diff --git a/convert-objects.c b/convert-objects.c
index cf03bcfe5aa4f95ec4b6384bc38d63b1e453f731..cefbcebdcaa0a085745c81b2ed1103e9575cb635 100644 (file)
--- a/convert-objects.c
+++ b/convert-objects.c
unsigned int mode;
char *slash, *origpath;
- if (!path || strtoul_ui(buffer, 8, &mode) != 1)
+ if (!path || strtoul_ui(buffer, 8, &mode))
die("bad tree conversion");
mode = convert_mode(mode);
path++;