From c457229af76d483aeeba2a910aeb84f23180b2bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Luis=20Sanmart=C3=ADn=20Rozada?= Date: Sun, 31 May 2015 20:56:49 +0200 Subject: [PATCH] processes: use cf_util_get_boolean for get "CollectContextSwitch" --- src/processes.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/processes.c b/src/processes.c index d549291e..059f9eba 100644 --- a/src/processes.c +++ b/src/processes.c @@ -609,14 +609,7 @@ static int ps_config (oconfig_item_t *ci) } else if (strcasecmp (c->key, "CollectContextSwitch") == 0) { - if ((c->values_num != 1) - || (c->values[0].type != OCONFIG_TYPE_BOOLEAN)) - { - ERROR ("processes plugin: `CollectContextSwitch' needs exactly " - "one boolean argument."); - continue; - } - report_ctx_switch = c->values[0].value.boolean ? 1 : 0; + cf_util_get_boolean (c, &report_ctx_switch); } else { -- 2.30.2