Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2007-04-19 06:08:15 +0400
committerJunio C Hamano <junkio@cox.net>2007-04-19 06:26:33 +0400
commit6e6db39afc305e1205a4d2dcf34680bfa80bfc24 (patch)
treec2d17f82c086514d8560c4e2492670d1befa7b42 /convert-objects.c
parent9f1beb7140584b3eb803cc9a69cbced528209f6e (diff)
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 'convert-objects.c')
-rw-r--r--convert-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/convert-objects.c b/convert-objects.c
index cf03bcfe5a..cefbcebdca 100644
--- a/convert-objects.c
+++ b/convert-objects.c
@@ -88,7 +88,7 @@ static int write_subdirectory(void *buffer, unsigned long size, const char *base
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++;