util.c (parse_ulong): Fix typo which cases parse_ulong to

coredump if the err variable is filled in (for example, if
	the -b or -s options are passed to the debugfs's
	command-line invocation).
bitmap-optimize
Theodore Ts'o 2002-04-01 15:42:21 -05:00
parent 116db1b513
commit e5b3b27966
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2002-04-01 <tytso@snap.thunk.org>
* util.c (parse_ulong): Fix typo which cases parse_ulong to
coredump if the err variable is filled in (for example, if
the -b or -s options are passed to the debugfs's
command-line invocation).
2002-03-11 Theodore Tso <tytso@mit.edu>
* ls.c (list_dir_proc): Fix bug: ls -l fails to print the file

View File

@ -146,12 +146,12 @@ unsigned long parse_ulong(const char *str, const char *cmd,
ret = strtoul(str, &tmp, 0);
if (*tmp == 0) {
if (*err)
if (err)
*err = 0;
return ret;
}
com_err(cmd, 0, "Bad %s - %s", descr, str);
if (*err)
if (err)
*err = 1;
else
exit(1);