aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2011-01-24 16:33:30 +0100
committerKevin Wolf <kwolf@redhat.com>2011-01-31 10:03:00 +0100
commit7eb053494c76bb417f83b6e6784a5dbb27638dba (patch)
tree8453faf31f5dfe80143f2714b607b7c4b6702933 /cutils.c
parentstrtosz() use qemu_toupper() to simplify switch statement (diff)
downloadqemu-kvm-7eb053494c76bb417f83b6e6784a5dbb27638dba.tar.gz
qemu-kvm-7eb053494c76bb417f83b6e6784a5dbb27638dba.tar.bz2
qemu-kvm-7eb053494c76bb417f83b6e6784a5dbb27638dba.zip
strtosz(): Fix name confusion in use of modf()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'cutils.c')
-rw-r--r--cutils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cutils.c b/cutils.c
index 78d35e23c..369a01687 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;
}
/*