apache: warn about possible misconfiguration
[collectd.git] / src / write_redis.c
index 2925352..ecbea4e 100644 (file)
@@ -59,7 +59,6 @@ static int wr_write (const data_set_t *ds, /* {{{ */
   size_t value_size;
   char *value_ptr;
   int status;
-  int i;
 
   status = FORMAT_VL (ident, sizeof (ident), vl);
   if (status != 0)
@@ -69,9 +68,11 @@ static int wr_write (const data_set_t *ds, /* {{{ */
   memset (value, 0, sizeof (value));
   value_size = sizeof (value);
   value_ptr = &value[0];
-  format_values(value_ptr, value_size, ds, vl, 0);
 
+  status = format_values (value_ptr, value_size, ds, vl, /* store rates = */ 0);
   pthread_mutex_lock (&node->lock);
+  if (status != 0)
+    return (status);
 
   if (node->conn == NULL)
   {