summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d16eca7)
raw | patch | inline | side by side (parent: d16eca7)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 5 Jul 2009 06:52:51 +0000 (06:52 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 5 Jul 2009 06:52:51 +0000 (06:52 +0000) |
* fix some leftover ulong comments to llong
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3@1864 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3@1864 a5681a0c-68f1-0310-ab6d-d61299d08faa
program/src/rrd_restore.c | patch | blob | history |
index ef524b2ed9fc663b296bc49e6346f4ff6da79045..cc95f724b22f5df8996b2ab8265c33570ec2b37d 100644 (file)
return (0);
} /* int get_ulong_from_node */
-static int get_long_long_from_node(
+static int get_llong_from_node(
xmlDoc * doc,
xmlNode * node,
long long *value)
str_ptr = (char *) xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
if (str_ptr == NULL) {
- rrd_set_error("get_ulong_from_node: xmlNodeListGetString failed.");
+ rrd_set_error("get_llong_from_node: xmlNodeListGetString failed.");
return (-1);
}
xmlFree(str_ptr);
if (str_ptr == end_ptr) {
- rrd_set_error("get_long_long_from_node: Cannot parse buffer as unsigned long long: %s",
+ rrd_set_error("get_llong_from_node: Cannot parse buffer as unsigned long long: %s",
str_ptr);
return (-1);
}
*value = temp;
return (0);
-} /* int get_ulong_from_node */
+} /* int get_llong_from_node */
static int get_double_from_node(
xmlDoc * doc,
&rrd->stat_head->pdp_step);
else if (xmlStrcmp(child->name, (const xmlChar *) "lastupdate") == 0)
if (sizeof(time_t) == sizeof(long)) {
- status = get_long_from_node(doc, child, (long *)&rrd->live_head->last_up);
+ status = get_long_from_node(doc, child, (long *)&rrd->live_head->last_up);
}
else if (sizeof(time_t) == sizeof(long long)) {
- status = get_long_long_from_node(doc, child, (long long *)&rrd->live_head->last_up);
+ status = get_llong_from_node(doc, child, (long long *)&rrd->live_head->last_up);
+ }
+ else {
+ rrd_set_error("can't convert to time_t ...", child->name);
+ status = -1;
}
else if (xmlStrcmp(child->name, (const xmlChar *) "ds") == 0)
status = parse_tag_ds(doc, child, rrd);