From: Jes Sorensen <[email protected]>
Signed-off-by: Jes Sorensen <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
---
cutils.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cutils.c b/cutils.c
index 78d35e2..369a016 100644
--- a/cutils.c
+++ b/cutils.c
@@ -304,8 +304,8 @@ int64_t strtosz_suffix(const char *nptr, char **end, const
char default_suffix)
if (isnan(val) || endptr == nptr || errno != 0) {
goto fail;
}
- integral = modf(val, &fraction);
- if (integral != 0) {
+ fraction = modf(val, &integral);
+ if (fraction != 0) {
mul_required = 1;
}
/*
--
1.7.2.3