aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorRaphael Norwitz <raphael.s.norwitz@gmail.com>2020-05-07 17:37:58 -0400
committerMichael S. Tsirkin <mst@redhat.com>2020-06-12 10:17:06 -0400
commit62925fd2b8b778539607b321216cd54897ddb63a (patch)
treed43e22ea85b9a5f025355f79de9e35be10f81b1e /hw
parent32905fc95c0a082f4cb28b8076e0160b3c62c7f8 (diff)
Fix parameter type in vhost migration log path
The ‘enable’ parameter to the vhost_migration_log() function is given as an int, but "true"/"false" values are passed in wherever it is invoked. Inside the function itself it is only ever compared with bool values. Therefore the parameter value itself should be changed to bool. Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com> Message-Id: <CAFubqFtqNZw=Y-ar3N=3zTQi6LkKg_G-7W7OOHHbE7Y1fV7HAQ@mail.gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/virtio/vhost.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index aff98a0ede..aa06a36919 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -809,12 +809,12 @@ err_features:
return r;
}
-static int vhost_migration_log(MemoryListener *listener, int enable)
+static int vhost_migration_log(MemoryListener *listener, bool 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) {