Remove pointless bool conversions

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Ján Tomko 2024-10-11 12:56:22 +02:00
parent d7a57f5275
commit e996536a3b
5 changed files with 9 additions and 9 deletions

View File

@ -873,7 +873,7 @@ libxlDomainCleanup(libxlDriverPrivate *driver,
priv->deathW = NULL; priv->deathW = NULL;
} }
if (!!g_atomic_int_dec_and_test(&driver->nactive) && driver->inhibitCallback) if (g_atomic_int_dec_and_test(&driver->nactive) && driver->inhibitCallback)
driver->inhibitCallback(false, driver->inhibitOpaque); driver->inhibitCallback(false, driver->inhibitOpaque);
/* Release auto-allocated graphics ports */ /* Release auto-allocated graphics ports */

View File

@ -203,7 +203,7 @@ static void virLXCProcessCleanup(virLXCDriver *driver,
vm->pid = 0; vm->pid = 0;
vm->def->id = -1; vm->def->id = -1;
if (!!g_atomic_int_dec_and_test(&driver->nactive) && driver->inhibitCallback) if (g_atomic_int_dec_and_test(&driver->nactive) && driver->inhibitCallback)
driver->inhibitCallback(false, driver->inhibitOpaque); driver->inhibitCallback(false, driver->inhibitOpaque);
virLXCDomainReAttachHostDevices(driver, vm->def); virLXCDomainReAttachHostDevices(driver, vm->def);

View File

@ -588,7 +588,7 @@ virNWFilterSnoopReqPut(virNWFilterSnoopReq *req)
if (!req) if (!req)
return; return;
if (!!g_atomic_int_dec_and_test(&req->refctr)) { if (g_atomic_int_dec_and_test(&req->refctr)) {
/* /*
* delete the request: * delete the request:
* - if we don't find req on the global list anymore * - if we don't find req on the global list anymore
@ -743,7 +743,7 @@ virNWFilterSnoopReqLeaseDel(virNWFilterSnoopReq *req,
skip_instantiate: skip_instantiate:
g_free(ipl); g_free(ipl);
ignore_value(!!g_atomic_int_dec_and_test(&virNWFilterSnoopState.nLeases)); ignore_value(g_atomic_int_dec_and_test(&virNWFilterSnoopState.nLeases));
return ret; return ret;
} }
@ -1004,7 +1004,7 @@ static void virNWFilterDHCPDecodeWorker(void *jobdata, void *opaque)
_("Instantiation of rules failed on interface '%1$s'"), _("Instantiation of rules failed on interface '%1$s'"),
req->binding->portdevname); req->binding->portdevname);
} }
ignore_value(!!g_atomic_int_dec_and_test(job->qCtr)); ignore_value(g_atomic_int_dec_and_test(job->qCtr));
} }
/* /*
@ -1388,7 +1388,7 @@ virNWFilterDHCPSnoopThread(void *req0)
pcap_close(pcapConf[i].handle); pcap_close(pcapConf[i].handle);
} }
ignore_value(!!g_atomic_int_dec_and_test(&virNWFilterSnoopState.nThreads)); ignore_value(g_atomic_int_dec_and_test(&virNWFilterSnoopState.nThreads));
return; return;
} }

View File

@ -8711,7 +8711,7 @@ void qemuProcessStop(virQEMUDriver *driver,
if (priv->eventThread) if (priv->eventThread)
g_object_unref(g_steal_pointer(&priv->eventThread)); g_object_unref(g_steal_pointer(&priv->eventThread));
if (!!g_atomic_int_dec_and_test(&driver->nactive) && driver->inhibitCallback) if (g_atomic_int_dec_and_test(&driver->nactive) && driver->inhibitCallback)
driver->inhibitCallback(false, driver->inhibitOpaque); driver->inhibitCallback(false, driver->inhibitOpaque);
/* Clear network bandwidth */ /* Clear network bandwidth */

View File

@ -780,8 +780,8 @@ virshSnapshotFilter(vshControl *ctl, virDomainSnapshotPtr snapshot,
return -1; return -1;
} }
if (STREQ(state, "disk-snapshot")) { if (STREQ(state, "disk-snapshot")) {
return !!((flags & VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY) && return (flags & VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY) &&
(flags & VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL)); (flags & VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL);
} }
if (!(flags & VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL)) if (!(flags & VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL))