Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/libxl/libxl_domain.c | 2 +-
src/lxc/lxc_process.c | 2 +-
src/nwfilter/nwfilter_dhcpsnoop.c | 8 ++++----
src/qemu/qemu_process.c | 2 +-
tools/virsh-snapshot.c | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 0f129ec69c..c0122eb295 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -855,7 +855,7 @@ libxlDomainCleanup(libxlDriverPrivate *driver,
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);
/* Release auto-allocated graphics ports */
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 205ab96ebb..dc6f4fc03c 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -203,7 +203,7 @@ static void virLXCProcessCleanup(virLXCDriver *driver,
vm->pid = 0;
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);
virLXCDomainReAttachHostDevices(driver, vm->def);
diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c
index 26072ec26e..e65dbb93d9 100644
--- a/src/nwfilter/nwfilter_dhcpsnoop.c
+++ b/src/nwfilter/nwfilter_dhcpsnoop.c
@@ -588,7 +588,7 @@ virNWFilterSnoopReqPut(virNWFilterSnoopReq *req)
if (!req)
return;
- if (!!g_atomic_int_dec_and_test(&req->refctr)) {
+ if (g_atomic_int_dec_and_test(&req->refctr)) {
/*
* delete the request:
* - if we don't find req on the global list anymore
@@ -743,7 +743,7 @@ virNWFilterSnoopReqLeaseDel(virNWFilterSnoopReq *req,
skip_instantiate:
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;
}
@@ -1004,7 +1004,7 @@ static void virNWFilterDHCPDecodeWorker(void *jobdata, void
*opaque)
_("Instantiation of rules failed on interface
'%1$s'"),
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);
}
- ignore_value(!!g_atomic_int_dec_and_test(&virNWFilterSnoopState.nThreads));
+ ignore_value(g_atomic_int_dec_and_test(&virNWFilterSnoopState.nThreads));
return;
}
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index a00066e88e..f85e164c10 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8743,7 +8743,7 @@ void qemuProcessStop(virQEMUDriver *driver,
if (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);
/* Clear network bandwidth */
diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
index 8b6a950a01..e0be8e7582 100644
--- a/tools/virsh-snapshot.c
+++ b/tools/virsh-snapshot.c
@@ -780,8 +780,8 @@ virshSnapshotFilter(vshControl *ctl, virDomainSnapshotPtr snapshot,
return -1;
}
if (STREQ(state, "disk-snapshot")) {
- return !!((flags & VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY) &&
- (flags & VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL));
+ return (flags & VIR_DOMAIN_SNAPSHOT_LIST_DISK_ONLY) &&
+ (flags & VIR_DOMAIN_SNAPSHOT_LIST_EXTERNAL);
}
if (!(flags & VIR_DOMAIN_SNAPSHOT_LIST_INTERNAL))
--
2.47.0