summaryrefslogtreecommitdiff
path: root/builtin-update-index.c
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2007-04-19 03:08:15 +0100
committerJunio C Hamano <junkio@cox.net>2007-04-18 19:26:33 -0700
commit6e6db39afc305e1205a4d2dcf34680bfa80bfc24 (patch)
treec2d17f82c086514d8560c4e2492670d1befa7b42 /builtin-update-index.c
parent9f1beb7140584b3eb803cc9a69cbced528209f6e (diff)
downloadgit-6e6db39afc305e1205a4d2dcf34680bfa80bfc24.tar.gz
fix up strtoul_ui error handling
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>
Diffstat (limited to 'builtin-update-index.c')
-rw-r--r--builtin-update-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-update-index.c b/builtin-update-index.c
index 6ed61ebc57..8659800eec 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -551,7 +551,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
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"