summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7272f60)
raw | patch | inline | side by side (parent: 7272f60)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 11 Jan 2010 09:09:42 +0000 (09:09 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 11 Jan 2010 09:09:42 +0000 (09:09 +0000) |
program/src/rrd_restore.c | patch | blob | history |
index cefdfaea1da699431e1d234256468a9cea04df4b..97164acffb3e7179516040df0a90697d4f5970a4 100644 (file)
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);
}
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);
*value = temp;
return (0);
-} /* int get_long_from_node */
+} /* int get_int_from_node */
static int get_ulong_from_node(
xmlDoc * doc,
&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);