[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix erroneous double negation in conditional
From: |
Raphael Norwitz |
Subject: |
[PATCH] Fix erroneous double negation in conditional |
Date: |
Thu, 7 May 2020 16:06:17 -0400 |
In vhost_migration_log() there is the following check:
if(!!enable == dev->log_enabled) {
return 0;
}
The double negative “!!” is unnecessary and bad coding style. This
change removes it.
Signed-off-by: Raphael Norwitz <address@hidden>
---
hw/virtio/vhost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index aff98a0..83be0c8 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -814,7 +814,7 @@ static int vhost_migration_log(MemoryListener
*listener, int enable)
struct vhost_dev *dev = container_of(listener, struct vhost_dev,
memory_listener);
int r;
- if (!!enable == dev->log_enabled) {
+ if (enable == dev->log_enabled) {
return 0;
}
if (!dev->started) {
--
1.8.3.1