From 4d18f9802a657dea2e88241a1a77bb28940a2b01 Mon Sep 17 00:00:00 2001 From: lzmths Date: Tue, 1 Dec 2015 21:40:36 -0300 Subject: [PATCH] Cleaning conditional directives that break statements. --- src/varnish.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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."); -- 2.30.2