From 4928cae51108c75e46cc7a1b158d6c86726db87b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 28 Oct 2016 10:44:47 +0200 Subject: [PATCH] virt plugin: Use the IS_TRUE() macro. --- src/virt.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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) { -- 2.11.0