projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a83726a
)
(humblock): Set *options even when returning due to
author
Jim Meyering
<jim@meyering.net>
Tue, 12 Apr 2005 06:55:03 +0000
(06:55 +0000)
committer
Jim Meyering
<jim@meyering.net>
Tue, 12 Apr 2005 06:55:03 +0000
(06:55 +0000)
xstrtoumax conversion failure. Thanks to a used-uninitialized
warning from gcc-4.
lib/human.c
patch
|
blob
|
history
diff --git
a/lib/human.c
b/lib/human.c
index 79336624a96055a15e7c604f3ed2660498e8e764..1e8a59033624b36a5ba1dfd856d8671775bba6d5 100644
(file)
--- 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)
{