• D
    Fix logic in qemuDomainObjPrivateXMLParseVcpu · ed1fbd7c
    Daniel P. Berrange 提交于
    The code in qemuDomainObjPrivateXMLParseVcpu for parsing
    the 'idstr' string was comparing the overall boolean
    result against 0 which was always true
    
    qemu/qemu_domain.c: In function 'qemuDomainObjPrivateXMLParseVcpu':
    qemu/qemu_domain.c:1482:59: error: comparison of constant '0' with boolean expression is always false [-Werror=bool-compare]
         if ((idstr && virStrToLong_uip(idstr, NULL, 10, &idx)) < 0 ||
                                                               ^
    
    It was further performing two distinct error checks in
    the same conditional and reporting a single error message,
    which was misleading in one of the two cases.
    
    This splits the conditional check into two parts with
    distinct error messages and fixes the logic error.
    
    Fixes the bug in
    
      commit 5184f398
      Author: Peter Krempa <pkrempa@redhat.com>
      Date:   Fri Jul 1 14:56:14 2016 +0200
    
        qemu: Store vCPU thread ids in vcpu private data objects
    Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
    ed1fbd7c
qemu_domain.c 175.0 KB