From: Jim Meyering Date: Sat, 9 Apr 2005 12:35:41 +0000 (+0000) Subject: (humblock): Set *options even when returning due to X-Git-Tag: CPPI-1_12~1064 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89e0ab6c9e3e7fd5e5cc774580457a980dfa0e40;p=platform%2Fupstream%2Fcoreutils.git (humblock): Set *options even when returning due to xstrtoumax conversion failure. Thanks to a used-uninitialized warning from gcc-4. --- diff --git a/lib/human.c b/lib/human.c index 7933662..1e8a590 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) {