Commit 62925fd2 authored by Raphael Norwitz's avatar Raphael Norwitz Committed by Michael S. Tsirkin
Browse files

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: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <CAFubqFtqNZw=Y-ar3N=3zTQi6LkKg_G-7W7OOHHbE7Y1fV7HAQ@mail.gmail.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 32905fc9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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) {