[goffice] dtoa: fixes from musl git.



commit 76defeeabd58b4ed703962aed956895edc2c3ebd
Author: Morten Welinder <terra gnome org>
Date:   Mon Apr 7 10:19:35 2014 -0400

    dtoa: fixes from musl git.

 ChangeLog              |    3 +++
 goffice/math/go-dtoa.c |    7 ++-----
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e88f222..8758e40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-04-07  Morten Welinder  <terra gnome org>
 
+       * goffice/math/go-dtoa.c (fmt_fp): Two fixes from musl.  (One we
+       already had.)
+
        * goffice/app/go-plugin.c (go_plugin_db_deactivate_plugin_list):
        Another leak fix.
        (go_plugins_get_available_plugins): Introspection fix.
diff --git a/goffice/math/go-dtoa.c b/goffice/math/go-dtoa.c
index ab70182..ec8d093 100644
--- a/goffice/math/go-dtoa.c
+++ b/goffice/math/go-dtoa.c
@@ -298,18 +298,15 @@ static int fmt_fp(FAKE_FILE *f, long double y, int w, int p, int fl, int t)
                                *d = *d + i;
                                while (*d > 999999999) {
                                        *d--=0;
-#ifndef MUSL_ORIGINAL
-                                       if (d < a) *--a = 0;
-#endif
+                                       if (d<a) *--a=0;
                                        (*d)++;
                                }
-                               if (d<a) a=d;
                                for (i=10, e=9*(r-a); *a>=i; i*=10, e++);
                        }
                }
                if (z>d+1) z=d+1;
-               for (; !z[-1] && z>a; z--);
        }
+       for (; !z[-1] && z>a; z--);
        
        if ((t|32)=='g') {
                if (!p) p++;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]