Patchwork [1/2] strtosz(): Fix name confusion in use of modf()

login
register
mail settings
Submitter Jes Sorensen
Date Jan. 17, 2011, 5:12 p.m.
Message ID <1295284345-24524-2-git-send-email-Jes.Sorensen@redhat.com>
Download mbox | patch
Permalink /patch/79196/
State New
Headers show

Comments

Jes Sorensen - Jan. 17, 2011, 5:12 p.m.
From: Jes Sorensen <Jes.Sorensen@redhat.com>

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

Patch

diff --git a/cutils.c b/cutils.c
index f7aa90c..328738c 100644
--- a/cutils.c
+++ b/cutils.c
@@ -304,8 +304,8 @@  ssize_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;
     }
     /*