diff options
-rw-r--r-- | hw/net/virtio-net.c | 4 | ||||
-rw-r--r-- | kvm-all.c | 2 | ||||
-rw-r--r-- | qemu-img.c | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 1187ab813b..27adcc5467 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -120,8 +120,8 @@ static void virtio_net_vhost_status(VirtIONet *n, uint8_t status) return; } - if (!!n->vhost_started == - (virtio_net_started(n, status) && !nc->peer->link_down)) { + if ((virtio_net_started(n, status) && !nc->peer->link_down) == + !!n->vhost_started) { return; } if (!n->vhost_started) { @@ -366,7 +366,7 @@ static void kvm_log_stop(MemoryListener *listener, } } -static int kvm_set_migration_log(int enable) +static int kvm_set_migration_log(bool enable) { KVMState *s = kvm_state; KVMSlot *mem; diff --git a/qemu-img.c b/qemu-img.c index 6d17755f49..5af6f455df 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -976,7 +976,8 @@ static int is_allocated_sectors_min(const uint8_t *buf, int n, int *pnum, static int compare_sectors(const uint8_t *buf1, const uint8_t *buf2, int n, int *pnum) { - int res, i; + bool res; + int i; if (n <= 0) { *pnum = 0; |