From 609adfb86b92992c086113a8f4adbb84077165f2 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 3 Sep 2010 09:39:13 +0200 Subject: [PATCH] lpar plugin: Use booleans for the config options. --- src/lpar.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lpar.c b/src/lpar.c index 2267e03c..ef1fa596 100644 --- a/src/lpar.c +++ b/src/lpar.c @@ -42,12 +42,13 @@ static const char *config_keys[] = "ReportBySerial" }; static int config_keys_num = STATIC_ARRAY_SIZE (config_keys); -static int pool_stats = 0, - report_by_serial = 0; + +static _Bool pool_stats = 0; +static _Bool report_by_serial = 0; static u_longlong_t last_time_base; static u_longlong_t ent_counter; -static int donate_flag = 0; +static _Bool donate_flag = 0; static int lpar_config (const char *key, const char *value) @@ -56,11 +57,15 @@ static int lpar_config (const char *key, const char *value) { if (IS_TRUE (value)) pool_stats = 1; + else + pool_stats = 0; } else if (strcasecmp ("ReportBySerial", key) == 0) { if (IS_TRUE (value)) report_by_serial = 1; + else + report_by_serial = 0; } else { @@ -198,5 +203,5 @@ void module_register (void) plugin_register_read ("lpar", lpar_read); } /* void module_register */ -/* vim: set sw=2 sts=2 ts=8 : */ +/* vim: set sw=8 noet : */ -- 2.30.2