diff options
author | Jim Meyering <jim@meyering.net> | 2005-04-12 06:55:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-04-12 06:55:03 +0000 |
commit | 5b5e926b2655c761a29703156e3b52f8b9bb647e (patch) | |
tree | 301ae851829763d34321d0e9d836b10dfa35cf3e /lib/human.c | |
parent | a83726a9f1db54da8af0b87db1e693bf91886ca5 (diff) | |
download | gnulib-5b5e926b2655c761a29703156e3b52f8b9bb647e.tar.gz |
(humblock): Set *options even when returning due to
xstrtoumax conversion failure. Thanks to a used-uninitialized
warning from gcc-4.
Diffstat (limited to 'lib/human.c')
-rw-r--r-- | lib/human.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/human.c b/lib/human.c index 79336624a9..1e8a590336 100644 --- a/lib/human.c +++ b/lib/human.c @@ -451,7 +451,10 @@ humblock (char const *spec, uintmax_t *block_size, int *options) strtol_error e = xstrtoumax (spec, &ptr, 0, block_size, "eEgGkKmMpPtTyYzZ0"); if (e != LONGINT_OK) - return e; + { + *options = 0; + return e; + } for (; ! ('0' <= *spec && *spec <= '9'); spec++) if (spec == ptr) { |