From: Manuel Luis SanmartĂ­n Rozada Date: Sun, 31 May 2015 18:56:49 +0000 (+0200) Subject: processes: use cf_util_get_boolean for get "CollectContextSwitch" X-Git-Tag: collectd-5.6.0~703^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c457229af76d483aeeba2a910aeb84f23180b2bb;p=collectd.git processes: use cf_util_get_boolean for get "CollectContextSwitch" --- 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 {