Patchwork [03/28] strtosz(): Fix name confusion in use of modf()

login
register
mail settings
Submitter Kevin Wolf
Date Jan. 31, 2011, 3:28 p.m.
Message ID <1296487756-12553-4-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/81175/
State New
Headers show

Comments

Kevin Wolf - Jan. 31, 2011, 3:28 p.m.
From: Jes Sorensen <Jes.Sorensen@redhat.com>

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 cutils.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

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;
     }
     /*