@@ -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;
@@ -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;