From: Florian Forster Date: Sat, 13 Jul 2013 05:38:05 +0000 (+0200) Subject: write_graphite plugin: Actually check the return value of wg_send_message(). X-Git-Tag: collectd-5.3.1~1^2~3 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=3228653a01daec8e76bcfbd75b4e77e134aceae4;p=collectd.git write_graphite plugin: Actually check the return value of wg_send_message(). Assignment to "status" was missing. --- diff --git a/src/write_graphite.c b/src/write_graphite.c index 87befb63..11e09a2a 100644 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@ -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 */