Merge branch 'ff/local'
[collectd.git] / src / bind.c
index 1a06a4d..f9de8e6 100644 (file)
@@ -263,7 +263,7 @@ static void submit_counter(time_t ts, const char *plugin_instance, const char *t
 
   vl.values = values;
   vl.values_len = 1;
-  vl.time = (ts == 0) ? time (NULL) : ts;
+  vl.time = ts;
   sstrncpy(vl.host, hostname_g, sizeof(vl.host));
   sstrncpy(vl.plugin, "bind", sizeof(vl.plugin));
   if (plugin_instance) {
@@ -380,9 +380,9 @@ static int bind_xml_read_counter (xmlDoc *doc, xmlNode *node,
   xmlFree(str_ptr);
   if (str_ptr == end_ptr || errno)
   {
-    if (errno && value == LLONG_MIN)
+    if (errno && (value < 0))
       ERROR ("bind plugin: bind_xml_read_counter: strtoll failed with underflow.");
-    else if (errno && value == LLONG_MAX)
+    else if (errno && (value > 0))
       ERROR ("bind plugin: bind_xml_read_counter: strtoll failed with overflow.");
     else
       ERROR ("bind plugin: bind_xml_read_counter: strtoll failed.");