On 12/20/2012 05:01 PM, Jiri Denemark wrote:
Revert the condition to make it easier to read. The function is also
s/Revert/Invert/
renamed as ppcCompare to match other functions in PowerPC CPU
driver.
---
src/cpu/cpu_powerpc.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
- if ((cpu->arch != VIR_ARCH_NONE &&
- (host->arch != cpu->arch)) ||
- STRNEQ(host->model, cpu->model))
- return VIR_CPU_COMPARE_INCOMPATIBLE;
+ if ((cpu->arch == VIR_ARCH_NONE || host->arch == cpu->arch) &&
+ STREQ(host->model, cpu->model))
+ return VIR_CPU_COMPARE_IDENTICAL;
- return VIR_CPU_COMPARE_IDENTICAL;
+ return VIR_CPU_COMPARE_INCOMPATIBLE;
Took me a bit, but I agree that deMorgan's law was properly followed and
the logic is unchanged.
ACK.
--
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org