From: Radoslaw Jablonski Date: Fri, 18 May 2018 09:48:20 +0000 (+0100) Subject: virt: Cleanup - removed redundant true/false setting X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dde2f9e72ea606ebd0feefd96f17d834f3cea3e5;p=collectd.git virt: Cleanup - removed redundant true/false setting Setting explicitly true/false value in some cases was redundant. Change-Id: I80bbdcefbf895ca8943c9a9ac45f1bfccf7b2881 Signed-off-by: Radoslaw Jablonski --- diff --git a/src/virt.c b/src/virt.c index e9922703..d58f6829 100644 --- a/src/virt.c +++ b/src/virt.c @@ -630,7 +630,7 @@ static const struct ex_stats_item ex_stats_table[] = { }; /* BlockDeviceFormatBasename */ -static bool blockdevice_format_basename = false; +static bool blockdevice_format_basename; static enum bd_field blockdevice_format = target; static enum if_field interface_format = if_name; @@ -1397,8 +1397,7 @@ static void vcpu_pin_submit(virDomainPtr dom, int max_cpus, int vcpu, unsigned char *cpu_maps, int cpu_map_len) { for (int cpu = 0; cpu < max_cpus; ++cpu) { char type_instance[DATA_MAX_NAME_LEN]; - bool is_set = - VIR_CPU_USABLE(cpu_maps, cpu_map_len, vcpu, cpu) ? true : false; + bool is_set = VIR_CPU_USABLE(cpu_maps, cpu_map_len, vcpu, cpu); snprintf(type_instance, sizeof(type_instance), "vcpu_%d-cpu_%d", vcpu, cpu); submit(dom, "cpu_affinity", type_instance, &(value_t){.gauge = is_set}, 1);