[libsoup] libsoup/soup-xmlrpc.c: Use g_snprintf()
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] libsoup/soup-xmlrpc.c: Use g_snprintf()
- Date: Wed, 5 Aug 2015 16:32:49 +0000 (UTC)
commit a83276a8c5f3b39a212c0a22c98b2729647c27c6
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Jul 28 15:28:07 2015 +0800
libsoup/soup-xmlrpc.c: Use g_snprintf()
snprintf() is not universally available, so use g_snprintf() so that we can
be assured that platforms supported by GLib can compile this file without
problems.
https://bugzilla.gnome.org/show_bug.cgi?id=752952
libsoup/soup-xmlrpc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libsoup/soup-xmlrpc.c b/libsoup/soup-xmlrpc.c
index ee61da1..e428c2e 100644
--- a/libsoup/soup-xmlrpc.c
+++ b/libsoup/soup-xmlrpc.c
@@ -36,12 +36,12 @@ insert_value (xmlNode *parent, GValue *value)
xvalue = xmlNewChild (parent, NULL, (const xmlChar *)"value", NULL);
if (type == G_TYPE_INT) {
- snprintf (buf, sizeof (buf), "%d", g_value_get_int (value));
+ g_snprintf (buf, sizeof (buf), "%d", g_value_get_int (value));
xmlNewChild (xvalue, NULL,
(const xmlChar *)"int",
(const xmlChar *)buf);
} else if (type == G_TYPE_BOOLEAN) {
- snprintf (buf, sizeof (buf), "%d", g_value_get_boolean (value));
+ g_snprintf (buf, sizeof (buf), "%d", g_value_get_boolean (value));
xmlNewChild (xvalue, NULL,
(const xmlChar *)"boolean",
(const xmlChar *)buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]