mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
cpu: Cleanup coding style in generic CPU driver
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
c3d94f79d2
commit
871e64c66d
@ -64,8 +64,8 @@ genericCompare(virCPUDefPtr host,
|
||||
size_t i;
|
||||
unsigned int reqfeatures;
|
||||
|
||||
if (((cpu->arch != VIR_ARCH_NONE) &&
|
||||
(host->arch != cpu->arch)) ||
|
||||
if ((cpu->arch != VIR_ARCH_NONE &&
|
||||
host->arch != cpu->arch) ||
|
||||
STRNEQ(host->model, cpu->model))
|
||||
return VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||
|
||||
@ -83,13 +83,10 @@ genericCompare(virCPUDefPtr host,
|
||||
goto cleanup;
|
||||
}
|
||||
reqfeatures++;
|
||||
}
|
||||
else {
|
||||
if (cpu->type == VIR_CPU_TYPE_HOST ||
|
||||
cpu->features[i].policy == VIR_CPU_FEATURE_REQUIRE) {
|
||||
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||
goto cleanup;
|
||||
}
|
||||
} else if (cpu->type == VIR_CPU_TYPE_HOST ||
|
||||
cpu->features[i].policy == VIR_CPU_FEATURE_REQUIRE) {
|
||||
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,9 +96,9 @@ genericCompare(virCPUDefPtr host,
|
||||
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||
else
|
||||
ret = VIR_CPU_COMPARE_SUPERSET;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
ret = VIR_CPU_COMPARE_IDENTICAL;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
virHashFree(hash);
|
||||
|
Loading…
x
Reference in New Issue
Block a user