From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTAPP-0002co-4D for qemu-devel@nongnu.org; Wed, 04 Mar 2015 09:36:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTAPJ-0007R8-BF for qemu-devel@nongnu.org; Wed, 04 Mar 2015 09:36:23 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:47636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTAPJ-0007Qp-4I for qemu-devel@nongnu.org; Wed, 04 Mar 2015 09:36:17 -0500 Message-ID: <54F7185F.6070404@msgid.tls.msk.ru> Date: Wed, 04 Mar 2015 17:36:15 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1424448376-15599-1-git-send-email-rkrcmar@redhat.com> <1424448376-15599-2-git-send-email-rkrcmar@redhat.com> In-Reply-To: <1424448376-15599-2-git-send-email-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] fix GCC 5.0.0 logical-not-parentheses warnings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , qemu-devel@nongnu.org Cc: Paolo Bonzini , Michael Walle , Peter Maydell 20.02.2015 19:06, Radim Kr=C4=8Dm=C3=A1=C5=99 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, u= int8_t status) > return; > } > =20 > - if (!!n->vhost_started =3D=3D > - (virtio_net_started(n, status) && !nc->peer->link_down)) { > + if ((virtio_net_started(n, status) && !nc->peer->link_down) =3D=3D > + !!n->vhost_started) { btw, can this be rewritten as (bool)n->vhost_started instead of !!n->vhos_started ? Not questioning the patch itself, just wondering, as these double-negatives look ugly... Thanks, /mjt