Code

write_graphite plugin: Actually check the return value of wg_send_message().
authorFlorian Forster <octo@collectd.org>
Sat, 13 Jul 2013 05:38:05 +0000 (07:38 +0200)
committerFlorian Forster <octo@collectd.org>
Sat, 13 Jul 2013 05:38:37 +0000 (07:38 +0200)
Assignment to "status" was missing.

src/write_graphite.c

index 87befb6301e9bf35cc0593625d260fc313d110ff..11e09a2a8f45568e93012c71d0c61683f0164eef 100644 (file)
@@ -364,12 +364,9 @@ static int wg_write_messages (const data_set_t *ds, const value_list_t *vl,
         return (status);
 
     /* Send the message to graphite */
-    wg_send_message (buffer, cb);
-    if (status != 0)
-    {
-        /* An error message has already been printed. */
+    status = wg_send_message (buffer, cb);
+    if (status != 0) /* error message has been printed already. */
         return (status);
-    }
 
     return (0);
 } /* int wg_write_messages */