From: Florian Forster Date: Fri, 28 Oct 2016 08:44:47 +0000 (+0200) Subject: virt plugin: Use the IS_TRUE() macro. X-Git-Tag: collectd-5.7.0~43^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=4928cae51108c75e46cc7a1b158d6c86726db87b;p=collectd.git virt plugin: Use the IS_TRUE() macro. --- diff --git a/src/virt.c b/src/virt.c index 6e1cd219..6d83a5c5 100644 --- a/src/virt.c +++ b/src/virt.c @@ -363,14 +363,7 @@ lv_config (const char *key, const char *value) return 0; } if (strcasecmp (key, "BlockDeviceFormatBasename") == 0) { - if (strcasecmp (value, "true") == 0) - blockdevice_format_basename = 1; - else if (strcasecmp (value, "false") == 0) - blockdevice_format_basename = 0; - else { - ERROR (PLUGIN_NAME " plugin: unknown BlockDeviceFormatBasename: %s", value); - return -1; - } + blockdevice_format_basename = IS_TRUE (value); return 0; } if (strcasecmp (key, "InterfaceDevice") == 0) {