From 6a8d0094858560946382fd1843ee45d906522bc9 Mon Sep 17 00:00:00 2001 From: oetiker Date: Mon, 11 Jan 2010 09:09:42 +0000 Subject: [PATCH] must use int for a proper for to the freebsd 32 time_t issue git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3/program@1998 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_restore.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/rrd_restore.c b/src/rrd_restore.c index cefdfae..97164ac 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -92,18 +92,18 @@ static int get_string_from_node( return (0); } /* int get_string_from_node */ -static int get_long_from_node( +static int get_int_from_node( xmlDoc * doc, xmlNode * node, - long *value) + int *value) { - long temp; + int temp; char *str_ptr; char *end_ptr; str_ptr = (char *) xmlNodeListGetString(doc, node->xmlChildrenNode, 1); if (str_ptr == NULL) { - rrd_set_error("get_long_from_node: xmlNodeListGetString failed."); + rrd_set_error("get_int_from_node: xmlNodeListGetString failed."); return (-1); } @@ -111,7 +111,7 @@ static int get_long_from_node( temp = strtol(str_ptr, &end_ptr, 0); if (str_ptr == end_ptr) { - rrd_set_error("get_long_from_node: Cannot parse buffer as long: %s", + rrd_set_error("get_int_from_node: Cannot parse buffer as long: %s", str_ptr); xmlFree(str_ptr); return (-1); @@ -120,7 +120,7 @@ static int get_long_from_node( *value = temp; return (0); -} /* int get_long_from_node */ +} /* int get_int_from_node */ static int get_ulong_from_node( xmlDoc * doc, @@ -961,7 +961,7 @@ static int parse_tag_rrd( &rrd->stat_head->pdp_step); else if (xmlStrcmp(child->name, (const xmlChar *) "lastupdate") == 0) { if (sizeof(time_t) == sizeof(int)) { - status = get_long_from_node(doc, child, (long *)&rrd->live_head->last_up); + status = get_int_from_node(doc, child, (int *)&rrd->live_head->last_up); } else { if (sizeof(time_t) == sizeof(long long)) { status = get_llong_from_node(doc, child, (long long *)&rrd->live_head->last_up); -- 2.30.2