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->p
20.02.2015 19:06, Radim Krčmář wrote:
[]
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 45da34ad6129..93818675588e 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)
> r
2015-02-20 15:38+0100, Paolo Bonzini:
> On 20/02/2015 15:18, Radim Krčmář wrote:
> > -if (!!n->vhost_started ==
> > +if ((!!n->vhost_started) ==
> > (virtio_net_started(n, status) && !nc->peer->link_down)) {
>
> Does it still break if you just swap the terms?
No (there is no logi
On 20/02/2015 15:18, Radim Krčmář wrote:
> man gcc:
> Warn about logical not used on the left hand side operand of a
> comparison. This option does not warn if the RHS operand is of a
> boolean type.
>
> By preferring bool over int where sensible, but without modifying any
> depending cod