]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Fix conficts with HACKING doc
authorWei Jiangang <weijg.fnst@cn.fujitsu.com>
Thu, 15 Oct 2015 09:12:20 +0000 (17:12 +0800)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 15 Oct 2015 09:31:27 +0000 (11:31 +0200)
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>
src/conf/nwfilter_conf.c
src/nwfilter/nwfilter_dhcpsnoop.c
src/vz/vz_sdk.c

index aed82ad28847d781f8bf4899def86637bad62c60..f7ccb757447174e11bf2a8388a3885e76e44cef9 100644 (file)
@@ -3416,7 +3416,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf,
                break;
 
                case DATATYPE_BOOLEAN:
-                   if (item->u.boolean == true)
+                   if (item->u.boolean)
                        virBufferAddLit(buf, "true");
                    else
                        virBufferAddLit(buf, "false");
index f331e22e9ef78f16ead334d71301831e013a0e76..f05d4a86876c0c9b2c4567e5aab64a093403db2b 100644 (file)
@@ -1403,7 +1403,7 @@ virNWFilterDHCPSnoopThread(void *req0)
     }
 
     /* let creator know how well we initialized */
-    if (error == true || !threadkey || tmp < 0 || !worker ||
+    if (error || !threadkey || tmp < 0 || !worker ||
         ifindex != req->ifindex)
         req->threadStatus = THREAD_STATUS_FAIL;
     else
index 7a2afd6340d15b6af97d762a41f5a52c140b7fd6..c24477ca5a508299bb0f7b220a8bd68e08b631ab 100644 (file)
@@ -3293,7 +3293,7 @@ static int prlsdkAddDisk(PRL_HANDLE sdkdom,
         goto cleanup;
     }
 
-    if (bootDisk == true) {
+    if (bootDisk) {
         pret = PrlVmDev_GetIndex(sdkdisk, &devIndex);
         prlsdkCheckRetGoto(pret, cleanup);
 
@@ -3551,7 +3551,7 @@ prlsdkDoApplyConfig(virConnectPtr conn,
     for (i = 0; i < def->ndisks; i++) {
         bool bootDisk = false;
 
-        if (needBoot == true &&
+        if (needBoot &&
             def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_DISK) {
 
             needBoot = false;