From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8Vhc-0003U7-Mq for qemu-devel@nongnu.org; Tue, 17 Apr 2018 14:51:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8VhY-00083F-NP for qemu-devel@nongnu.org; Tue, 17 Apr 2018 14:51:40 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39866 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f8VhY-00082z-GF for qemu-devel@nongnu.org; Tue, 17 Apr 2018 14:51:36 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 99339EBFF3 for ; Tue, 17 Apr 2018 18:51:32 +0000 (UTC) References: <20180417133602.23832-1-marcandre.lureau@redhat.com> <20180417133602.23832-6-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <845bec97-25ef-6018-7700-f9bfde3c0bf6@redhat.com> Date: Tue, 17 Apr 2018 13:51:27 -0500 MIME-Version: 1.0 In-Reply-To: <20180417133602.23832-6-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4eMGR8aOOWLE2qaUZltdjz1wcDxVno0d3" Subject: Re: [Qemu-devel] [PATCH v5 5/5] qobject: modify qobject_ref() to assert on NULL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , qemu-devel@nongnu.org Cc: berrange@redhat.com, armbru@redhat.com, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4eMGR8aOOWLE2qaUZltdjz1wcDxVno0d3 From: Eric Blake To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , qemu-devel@nongnu.org Cc: berrange@redhat.com, armbru@redhat.com, pbonzini@redhat.com Message-ID: <845bec97-25ef-6018-7700-f9bfde3c0bf6@redhat.com> Subject: Re: [PATCH v5 5/5] qobject: modify qobject_ref() to assert on NULL References: <20180417133602.23832-1-marcandre.lureau@redhat.com> <20180417133602.23832-6-marcandre.lureau@redhat.com> In-Reply-To: <20180417133602.23832-6-marcandre.lureau@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/17/2018 08:36 AM, Marc-Andr=C3=A9 Lureau wrote: > While it may be convenient to accept NULL value in > qobject_unref() (for similar reasons as free() accepts NULL), it is > not such a good idea for qobject_ref(), assert() on NULL. One place > relied on that behaviour (the monitor request id), and it's best to be > explicit that NULL is accepted there. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > include/qapi/qmp/qobject.h | 7 ++++--- > monitor.c | 2 +- > 2 files changed, 5 insertions(+), 4 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --4eMGR8aOOWLE2qaUZltdjz1wcDxVno0d3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlrWQi8ACgkQp6FrSiUn Q2qZpggAmg8Pad66cMeIHimD8nvpFukXcrI9DHtxYG+/OpjnVmyfO4fD8aK7ZCUV kmkokcRKV4PTqDvku4V/+sqlRorsuIy7+jBmOLEYOBX+auq2+LSSjs9Y3b573ecq 26rN1UMmXE+BA4tT0JSfD4eFjFFWGSCPxaoUlgylZ9uSW7ygZBgUM0PDV4MAk6s+ CoclpYZOr4RYK+h4JOy9daVE2vP11Brnb1rJYVeaOPc2tbmru6+HKxvEZBYJqjPj Z+EDI5QikHKAXTdRSNajgvxDSVYNJjx97uM7x06caXwS/Ioq4eH3uVWTO8Puoq8j dayHrpHJQyikYCZjstVlp8y6cOEE+A== =Xf6P -----END PGP SIGNATURE----- --4eMGR8aOOWLE2qaUZltdjz1wcDxVno0d3--