From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Purge uses of banned g_assert_FOO()
Date: Mon, 11 Jun 2018 10:22:21 +0100 [thread overview]
Message-ID: <20180611092221.GE11636@redhat.com> (raw)
In-Reply-To: <87po0xn9fq.fsf@dusky.pond.sub.org>
On Mon, Jun 11, 2018 at 08:06:49AM +0200, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
>
> > On 06/08/2018 02:12 PM, Daniel P. Berrangé wrote:
> >> On Fri, Jun 08, 2018 at 07:02:31PM +0200, Markus Armbruster wrote:
> >>> We banned use of certain g_assert_FOO() functions outside tests, and
> >>> made checkpatch.pl flag them (commit 6e9389563e5). We neglected to
> >>> purge existing uses. Do that now.
> >>>
> >>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> >>> ---
> >>> hw/ide/ahci.c | 2 +-
> >>> hw/ppc/spapr_ovec.c | 12 ++++++------
> >>> hw/usb/dev-smartcard-reader.c | 2 +-
> >>> qom/object.c | 10 +++++-----
> >>> util/qht.c | 2 +-
> >>> 5 files changed, 14 insertions(+), 14 deletions(-)
> >>>
> >>> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
> >>
> >>> diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
> >>> index 2131e33d27..13d0befd9c 100644
> >>> --- a/hw/usb/dev-smartcard-reader.c
> >>> +++ b/hw/usb/dev-smartcard-reader.c
> >>> @@ -786,7 +786,7 @@ static void ccid_write_data_block(USBCCIDState *s, uint8_t slot, uint8_t seq,
> >>> DPRINTF(s, D_VERBOSE, "error %d\n", p->b.bError);
> >>> }
> >>> if (len) {
> >>> - g_assert_nonnull(data);
> >>> + assert(data);
> >>
> >> nitpick - all the other conversions used g_assert()
>
> The other conversions are in files that predominantly or exclusively use
> g_assert(). This one is in a file that exclusively uses assert().
Ah ok, makes sense then.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-06-11 9:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 17:02 [Qemu-devel] [PATCH] Purge uses of banned g_assert_FOO() Markus Armbruster
2018-06-08 17:12 ` Daniel P. Berrangé
2018-06-08 18:00 ` Philippe Mathieu-Daudé
2018-06-11 6:06 ` Markus Armbruster
2018-06-11 9:22 ` Daniel P. Berrangé [this message]
2018-06-08 17:19 ` Eric Blake
2018-06-08 19:22 ` John Snow
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=20180611092221.GE11636@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=f4bug@amsat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).