From: Raphael Norwitz <raphael.s.norw...@gmail.com> 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.norw...@nutanix.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Message-Id: <CAFubqFtqNZw=Y-ar3N=3ztqi6lkkg_g-7w7oohhbe7y1fv7...@mail.gmail.com> Signed-off-by: Laurent Vivier <laur...@vivier.eu> --- hw/virtio/vhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index aff98a0ede56..aa06a3691919 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) { -- 2.26.2