Code

add some more brackets just to be sure
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 6 Jul 2009 10:03:23 +0000 (10:03 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Mon, 6 Jul 2009 10:03:23 +0000 (10:03 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3@1867 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_restore.c

index 56b8e7ad282c204699248779c08775b2675a0a40..6acfa4e07395be0f9bc5fefc11e6437dfb38745f 100644 (file)
@@ -957,17 +957,19 @@ static int parse_tag_rrd(
         else if (xmlStrcmp(child->name, (const xmlChar *) "step") == 0)
             status = get_ulong_from_node(doc, child,
                                         &rrd->stat_head->pdp_step);
-        else if (xmlStrcmp(child->name, (const xmlChar *) "lastupdate") == 0)
+        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);
             }
-            else if (sizeof(time_t) == sizeof(long long)) {
-               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 (sizeof(time_t) == sizeof(long long)) {
+                       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);
         else if (xmlStrcmp(child->name, (const xmlChar *) "rra") == 0)