summaryrefslogtreecommitdiff
path: root/gdata/gdata-batch-feed.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2014-08-09 16:00:17 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2014-08-09 16:00:17 +0100
commit7cc30298b050da7a02eb990b6ad2dc40b4f57dbc (patch)
tree71ca95e9765c720f681dad110e3f1778a9718850 /gdata/gdata-batch-feed.c
parent79608af2618cd84abb415d867cfea7f648dc111e (diff)
downloadlibgdata-7cc30298b050da7a02eb990b6ad2dc40b4f57dbc.tar.gz
core: Use g_ascii_strto[u]ll() instead of strto[u]l()
The GLib functions are locale-independent. While there are few situations where a locale-independent server-provided string would be parsed differently by strtoul() in different user locales, it’s best to be safe (and consistent with our use of g_ascii_strtod(), which more easily causes problems).
Diffstat (limited to 'gdata/gdata-batch-feed.c')
-rw-r--r--gdata/gdata-batch-feed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdata/gdata-batch-feed.c b/gdata/gdata-batch-feed.c
index 26e83201..16d2b486 100644
--- a/gdata/gdata-batch-feed.c
+++ b/gdata/gdata-batch-feed.c
@@ -81,7 +81,7 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
if (xmlStrcmp (entry_node->name, (xmlChar*) "id") == 0) {
/* batch:id */
xmlChar *id_string = xmlNodeListGetString (doc, entry_node->children, TRUE);
- id = strtoul ((char*) id_string, NULL, 10);
+ id = g_ascii_strtoull ((char*) id_string, NULL, 10);
xmlFree (id_string);
} else if (xmlStrcmp (entry_node->name, (xmlChar*) "status") == 0) {
/* batch:status */
@@ -89,7 +89,7 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
xmlNode *child_node;
status_code_string = xmlGetProp (entry_node, (xmlChar*) "code");
- status_code = strtoul ((char*) status_code_string, NULL, 10);
+ status_code = g_ascii_strtoull ((char*) status_code_string, NULL, 10);
xmlFree (status_code_string);
status_reason = (gchar*) xmlGetProp (entry_node, (xmlChar*) "reason");