virt: Cleanup - removed redundant true/false setting
authorRadoslaw Jablonski <radoslawx.jablonski@intel.com>
Fri, 18 May 2018 09:48:20 +0000 (10:48 +0100)
committerRadoslaw Jablonski <radoslawx.jablonski@intel.com>
Fri, 18 May 2018 10:05:42 +0000 (11:05 +0100)
Setting explicitly true/false value in some cases was redundant.

Change-Id: I80bbdcefbf895ca8943c9a9ac45f1bfccf7b2881
Signed-off-by: Radoslaw Jablonski <radoslawx.jablonski@intel.com>
src/virt.c

index e992270..d58f682 100644 (file)
@@ -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);