From: Ruben Kerkhof Date: Sun, 5 Mar 2017 17:02:30 +0000 (+0100) Subject: utils_cmd_flush.c: fix another build warning X-Git-Tag: collectd-5.8.0~216 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b89f06dbfca0d64c18b4b34a29f1365635b407d3;p=collectd.git utils_cmd_flush.c: fix another build warning src/utils_cmd_flush.c:140:11: warning: declaration shadows a local variable [-Wshadow] int status; ^ src/utils_cmd_flush.c:114:7: note: previous declaration is here int status; ^ --- diff --git a/src/utils_cmd_flush.c b/src/utils_cmd_flush.c index f7f024ed..25a55122 100644 --- a/src/utils_cmd_flush.c +++ b/src/utils_cmd_flush.c @@ -137,7 +137,6 @@ cmd_status_t cmd_handle_flush(FILE *fh, char *buffer) { for (size_t j = 0; (j == 0) || (j < cmd.cmd.flush.identifiers_num); j++) { char *identifier = NULL; char buf[1024]; - int status; if (cmd.cmd.flush.identifiers_num != 0) { identifier_t *id = cmd.cmd.flush.identifiers + j; @@ -150,9 +149,8 @@ cmd_status_t cmd_handle_flush(FILE *fh, char *buffer) { identifier = buf; } - status = plugin_flush(plugin, DOUBLE_TO_CDTIME_T(cmd.cmd.flush.timeout), - identifier); - if (status == 0) + if (plugin_flush(plugin, DOUBLE_TO_CDTIME_T(cmd.cmd.flush.timeout), + identifier) == 0) success++; else error++;