mirror of https://gitee.com/openkylin/libvirt.git
Fix conficts with HACKING doc
Don't compare a bool variable against the literal, "true". Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
3bbaf7b86f
commit
c3d4eb124c
|
@ -3416,7 +3416,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DATATYPE_BOOLEAN:
|
case DATATYPE_BOOLEAN:
|
||||||
if (item->u.boolean == true)
|
if (item->u.boolean)
|
||||||
virBufferAddLit(buf, "true");
|
virBufferAddLit(buf, "true");
|
||||||
else
|
else
|
||||||
virBufferAddLit(buf, "false");
|
virBufferAddLit(buf, "false");
|
||||||
|
|
|
@ -1403,7 +1403,7 @@ virNWFilterDHCPSnoopThread(void *req0)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* let creator know how well we initialized */
|
/* let creator know how well we initialized */
|
||||||
if (error == true || !threadkey || tmp < 0 || !worker ||
|
if (error || !threadkey || tmp < 0 || !worker ||
|
||||||
ifindex != req->ifindex)
|
ifindex != req->ifindex)
|
||||||
req->threadStatus = THREAD_STATUS_FAIL;
|
req->threadStatus = THREAD_STATUS_FAIL;
|
||||||
else
|
else
|
||||||
|
|
|
@ -3293,7 +3293,7 @@ static int prlsdkAddDisk(PRL_HANDLE sdkdom,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bootDisk == true) {
|
if (bootDisk) {
|
||||||
pret = PrlVmDev_GetIndex(sdkdisk, &devIndex);
|
pret = PrlVmDev_GetIndex(sdkdisk, &devIndex);
|
||||||
prlsdkCheckRetGoto(pret, cleanup);
|
prlsdkCheckRetGoto(pret, cleanup);
|
||||||
|
|
||||||
|
@ -3551,7 +3551,7 @@ prlsdkDoApplyConfig(virConnectPtr conn,
|
||||||
for (i = 0; i < def->ndisks; i++) {
|
for (i = 0; i < def->ndisks; i++) {
|
||||||
bool bootDisk = false;
|
bool bootDisk = false;
|
||||||
|
|
||||||
if (needBoot == true &&
|
if (needBoot &&
|
||||||
def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_DISK) {
|
def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_DISK) {
|
||||||
|
|
||||||
needBoot = false;
|
needBoot = false;
|
||||||
|
|
Loading…
Reference in New Issue