From: lzmths Date: Wed, 2 Dec 2015 00:40:36 +0000 (-0300) Subject: Cleaning conditional directives that break statements. X-Git-Tag: collectd-5.6.0~535^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4d18f9802a657dea2e88241a1a77bb28940a2b01;p=collectd.git Cleaning conditional directives that break statements. --- diff --git a/src/varnish.c b/src/varnish.c index c6c4df05..36908ff1 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -23,6 +23,7 @@ * Florian octo Forster **/ +#include #include "collectd.h" #include "common.h" #include "plugin.h" @@ -588,6 +589,7 @@ static int varnish_read (user_data_t *ud) /* {{{ */ { struct VSM_data *vd; const c_varnish_stats_t *stats; + bool test; user_config_t *conf; @@ -617,10 +619,11 @@ static int varnish_read (user_data_t *ud) /* {{{ */ } #if HAVE_VARNISH_V3 - if (VSC_Open (vd, /* diag = */ 1)) + test = VSC_Open (vd, /* diag = */ 1); #else /* if HAVE_VARNISH_V4 */ - if (VSM_Open (vd)) + test = VSM_Open (vd); #endif + if (test) { VSM_Delete (vd); ERROR ("varnish plugin: Unable to open connection.");