[gtk+] Fix build of commit f23e99b



commit cd44f6d875c0011931a360901c233f79c1bfde10
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jun 27 11:53:30 2016 +0800

    Fix build of commit f23e99b
    
    Commit f23e99b made use of snprintf(), which is not universally available.
    Fix this by using g_snprintf().

 gtk/gtkscale.c      |    2 +-
 gtk/gtkspinbutton.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 2a40227..8c2f797 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -1939,7 +1939,7 @@ weed_out_neg_zero (gchar *str, gint digits)
   if (str[0] == '-')
     {
       gchar neg_zero[8];
-      snprintf (neg_zero, 8, "%0.*f", digits, -0.0);
+      g_snprintf (neg_zero, 8, "%0.*f", digits, -0.0);
       if (strcmp (neg_zero, str) == 0)
         memmove (str, str + 1, strlen (str) - 1);
     }
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index c159f26..452ed33 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -1121,7 +1121,7 @@ weed_out_neg_zero (gchar *str, gint digits)
   if (str[0] == '-')
     {
       gchar neg_zero[8];
-      snprintf (neg_zero, 8, "%0.*f", digits, -0.0);
+      g_snprintf (neg_zero, 8, "%0.*f", digits, -0.0);
       if (strcmp (neg_zero, str) == 0)
         memmove (str, str + 1, strlen (str) - 1);
     }


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