summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael Norwitz2020-05-07 23:37:58 +0200
committerLaurent Vivier2020-06-09 18:46:41 +0200
commit705f7f2fce25e774e19f6853cd92ebaf909958f3 (patch)
tree2501e9cbf39a865871f56fc48f77de47a622def4
parentMerge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.1-pull-re... (diff)
downloadqemu-705f7f2fce25e774e19f6853cd92ebaf909958f3.tar.gz
qemu-705f7f2fce25e774e19f6853cd92ebaf909958f3.tar.xz
qemu-705f7f2fce25e774e19f6853cd92ebaf909958f3.zip
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> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <CAFubqFtqNZw=Y-ar3N=3zTQi6LkKg_G-7W7OOHHbE7Y1fV7HAQ@mail.gmail.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-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) {