2015-03-04 17:36+0300, Michael Tokarev: > 20.02.2015 19:06, Radim Krčmář wrote: > > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > > - 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) { > > btw, can this be rewritten as > (bool)n->vhost_started > instead of > !!n->vhos_started
Yes. (It's the same as long as we use bool from stdbool.h.) > Not questioning the patch itself, just wondering, as these > double-negatives look ugly... Casting to bool looks better to me as well, yet the QEMU design guide, `grep $x | wc -l`, greatly prefers bangs. I think that it is best to define it as bool in struct VirtIONet, but I prefer not to change decision that I don't understand ... Thanks for accepting the patches.