diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-07-28 15:28:07 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-08-06 00:32:05 +0800 |
commit | a83276a8c5f3b39a212c0a22c98b2729647c27c6 (patch) | |
tree | b67085068af5ecf7d994e4e5020689f9fdcdb51e | |
parent | 02b0f5945f1dae5180b4308361fd118ba5bb635c (diff) | |
download | libsoup-a83276a8c5f3b39a212c0a22c98b2729647c27c6.tar.gz |
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
-rw-r--r-- | 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 ee61da10..e428c2e9 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); |