Whamcloud - gitweb
util.c (parse_ulong): Fix typo which cases parse_ulong to
authorTheodore Ts'o <tytso@mit.edu>
Mon, 1 Apr 2002 20:42:21 +0000 (15:42 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 1 Apr 2002 20:42:21 +0000 (15:42 -0500)
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).

debugfs/ChangeLog
debugfs/util.c

index cde9e6d..2317403 100644 (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
index fa13da4..1a169c1 100644 (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);