diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-20 11:35:14 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-21 10:27:28 +0100 |
commit | edd9912ffb4a44068aae2ec21f0449d3d53616a3 (patch) | |
tree | 204cd6b68ae5ddbb509d53b93bd79a4b8b68637e | |
parent | 32e60534c7e2b6093de74bd75d37cb117f1d3a5c (diff) |
libps: fix the length computation in fprint_frac_value
Found using the Clang Static Analyzer.
* libps/spec.c (fprint_frac_value): Fix computation of value_len.
-rw-r--r-- | libps/spec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libps/spec.c b/libps/spec.c index b34a2343..146aba55 100644 --- a/libps/spec.c +++ b/libps/spec.c @@ -416,7 +416,7 @@ sprint_frac_value (char *buf, if (value >= 1000) /* the integer part */ value_len = 4; /* values 1000-1023 */ - if (value >= 100) + else if (value >= 100) value_len = 3; else if (value >= 10) value_len = 2; |