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>
This commit is contained in:
Andy Whitcroft
2007-04-19 03:08:15 +01:00
committed by Junio C Hamano
parent 9f1beb7140
commit 6e6db39afc
2 changed files with 2 additions and 2 deletions

View File

@ -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++;