From: Michael Tokarev <mjt@tls.msk.ru>
To: "Radim Krčmář" <rkrcmar@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Michael Walle <michael@walle.cc>,
Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] fix GCC 5.0.0 logical-not-parentheses warnings
Date: Wed, 04 Mar 2015 17:36:15 +0300 [thread overview]
Message-ID: <54F7185F.6070404@msgid.tls.msk.ru> (raw)
In-Reply-To: <1424448376-15599-2-git-send-email-rkrcmar@redhat.com>
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)
> 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) {
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
next prev parent reply other threads:[~2015-03-04 14:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 16:06 [Qemu-devel] [PATCH 0/2] Fix GCC 5.0.0 build errors Radim Krčmář
2015-02-20 16:06 ` [Qemu-devel] [PATCH 1/2] fix GCC 5.0.0 logical-not-parentheses warnings Radim Krčmář
2015-03-04 14:36 ` Michael Tokarev [this message]
2015-03-04 16:27 ` Radim Krčmář
2015-02-20 16:06 ` [Qemu-devel] [PATCH 2/2] milkymist-pfpu: fix GCC 5.0.0 aggressive-loop-optimizations warning Radim Krčmář
2015-02-23 17:32 ` [Qemu-trivial] " Michael Walle
2015-02-23 17:32 ` [Qemu-devel] " Michael Walle
2015-02-20 17:04 ` [Qemu-trivial] [PATCH 0/2] Fix GCC 5.0.0 build errors Radim Krčmář
2015-02-20 17:04 ` [Qemu-devel] " Radim Krčmář
2015-03-04 14:38 ` [Qemu-trivial] " Michael Tokarev
2015-03-04 14:38 ` [Qemu-devel] " Michael Tokarev
-- strict thread matches above, loose matches on Subject: below --
2015-02-20 14:18 Radim Krčmář
2015-02-20 14:18 ` [Qemu-devel] [PATCH 1/2] fix GCC 5.0.0 logical-not-parentheses warnings Radim Krčmář
2015-02-20 14:38 ` Paolo Bonzini
2015-02-20 15:43 ` Radim Krčmář
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F7185F.6070404@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=michael@walle.cc \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.