changeset 5791:2ef479ccc298

(humblock): Set *options even when returning due to xstrtoumax conversion failure. Thanks to a used-uninitialized warning from gcc-4.
author Jim Meyering <jim@meyering.net>
date Tue, 12 Apr 2005 06:55:03 +0000
parents 9c7ebeafbfa7
children f4436e62badb
files lib/human.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/human.c
+++ b/lib/human.c
@@ -451,7 +451,10 @@
 	  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)
 	      {