[gnumeric] Use strtoul instead of atoi for unsigned.



commit bc21e9b16cf3af7a188b59babeb565d9d7768138
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sat Jul 31 18:12:30 2010 +0200

    Use strtoul instead of atoi for unsigned.

 src/sheet-object-graph.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/sheet-object-graph.c b/src/sheet-object-graph.c
index cf47cd1..2048fb2 100644
--- a/src/sheet-object-graph.c
+++ b/src/sheet-object-graph.c
@@ -786,7 +786,7 @@ vector_start (GsfXMLIn *xin, xmlChar const **attrs)
 	int i;
 	for (i = 0; attrs != NULL && attrs[i] && attrs[i+1] ; i += 2)
 		if (0 == strcmp (attrs[i], "ID"))
-			state->cur_index = atoi (attrs[i+1]);
+			state->cur_index = strtoul (attrs[i+1], NULL, 10);
 	if (state->cur_index >= state->max_data) {
 		state->max_data += 10;
 		g_ptr_array_set_size (state->data, state->max_data);
@@ -875,7 +875,7 @@ dim_start (GsfXMLIn *xin, xmlChar const **attrs)
 		if (0 == strcmp (attrs[i], "dim_name"))
 			name = attrs[i+1];
 		else if (0 == strcmp (attrs[i], "ID"))
-			id = atoi (attrs[i+1]);
+			id = strtoul (attrs[i+1], NULL, 10);
 	if (0 == strcmp (name, "values"))
 		type = GOG_MS_DIM_VALUES;
 	else if (0 == strcmp (name, "categories"))



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