summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d18f98)
raw | patch | inline | side by side (parent: 4d18f98)
author | Florian Forster <octo@collectd.org> | |
Wed, 2 Dec 2015 09:43:42 +0000 (10:43 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 2 Dec 2015 09:43:42 +0000 (10:43 +0100) |
Also revert the inclusion of <stdbool.h> as per our coding guidelines.
The native C99 _Bool is used instead.
The native C99 _Bool is used instead.
src/varnish.c | patch | blob | history |
diff --git a/src/varnish.c b/src/varnish.c
index 36908ff17696fe2839d3356bee04b29193e84a1d..65562d323a91bc01da44feeee3c2056a461c17e5 100644 (file)
--- a/src/varnish.c
+++ b/src/varnish.c
* Florian octo Forster <octo at collectd.org>
**/
-#include <stdbool.h>
#include "collectd.h"
#include "common.h"
#include "plugin.h"
{
struct VSM_data *vd;
const c_varnish_stats_t *stats;
- bool test;
+ _Bool ok;
user_config_t *conf;
}
#if HAVE_VARNISH_V3
- test = VSC_Open (vd, /* diag = */ 1);
+ ok = (VSC_Open (vd, /* diag = */ 1) == 0);
#else /* if HAVE_VARNISH_V4 */
- test = VSM_Open (vd);
+ ok = (VSM_Open (vd) == 0);
#endif
- if (test)
+ if (!ok)
{
VSM_Delete (vd);
ERROR ("varnish plugin: Unable to open connection.");