From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] vhost_net: fix misuse of assert()
Date: Fri, 19 Jun 2015 12:15:50 +0200 [thread overview]
Message-ID: <20150619121512-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <CAFEAcA_GR2-t7sUUT6ob-rRd4wdGUdZZc3nhXgF6z-1chYj6HA@mail.gmail.com>
On Fri, Jun 19, 2015 at 11:13:40AM +0100, Peter Maydell wrote:
> On 19 June 2015 at 11:07, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Fri, Jun 19, 2015 at 12:00:53PM +0200, Greg Kurz wrote:
> >> In case NDEBUG is defined, assert() expands to nothing and
> >> vhost_net_set_vnet_endian() doesn't get called...
> >>
> >> Suggested-by: Thomas Huth <thuth@redhat.com>
> >> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> >
> > Not sure what the point is.
> > We don't support building with NDEBUG.
>
> Putting functional behaviour inside an assert() is still a really
> bad idea. If you're reading the code you probably skim over the
> assert() as not functionally relevant...
>
> -- PMM
I can apply this if commit log explains it's a readability
enhancement, not a bugfix.
--
MST
next prev parent reply other threads:[~2015-06-19 10:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 10:00 [Qemu-devel] [PATCH] vhost_net: fix misuse of assert() Greg Kurz
2015-06-19 10:07 ` Michael S. Tsirkin
2015-06-19 10:13 ` Peter Maydell
2015-06-19 10:15 ` Michael S. Tsirkin [this message]
2015-06-19 10:55 ` Markus Armbruster
2015-06-19 13:37 ` Michael S. Tsirkin
2015-06-19 14:00 ` Markus Armbruster
2015-06-19 14:06 ` Michael S. Tsirkin
2015-06-19 14:37 ` Greg Kurz
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=20150619121512-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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.