From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSZ5x-0002aJ-8g for qemu-devel@nongnu.org; Tue, 25 Mar 2014 17:41:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSZ5s-0006Pr-Np for qemu-devel@nongnu.org; Tue, 25 Mar 2014 17:41:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSZ5s-0006Pn-Dv for qemu-devel@nongnu.org; Tue, 25 Mar 2014 17:41:12 -0400 Message-ID: <5331F7F6.4010602@redhat.com> Date: Tue, 25 Mar 2014 15:41:10 -0600 From: Eric Blake MIME-Version: 1.0 References: <1395396763-26081-1-git-send-email-cyliu@suse.com> <1395396763-26081-11-git-send-email-cyliu@suse.com> In-Reply-To: <1395396763-26081-11-git-send-email-cyliu@suse.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BSwKuiI0eBDnWfjJ9k82jIaUm6Tc4MSak" Subject: Re: [Qemu-devel] [PATCH v23 10/32] check NULL input for qemu_opts_del List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chunyan Liu , qemu-devel@nongnu.org Cc: stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BSwKuiI0eBDnWfjJ9k82jIaUm6Tc4MSak Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/21/2014 04:12 AM, Chunyan Liu wrote: > To simplify later using of qemu_opts_del, accept NULL input. >=20 > Signed-off-by: Chunyan Liu > --- > util/qemu-option.c | 4 ++++ > 1 file changed, 4 insertions(+) Reviewed-by: Eric Blake >=20 > diff --git a/util/qemu-option.c b/util/qemu-option.c > index 6c304b2..e9802f3 100644 > --- a/util/qemu-option.c > +++ b/util/qemu-option.c > @@ -990,6 +990,10 @@ void qemu_opts_del(QemuOpts *opts) > { > QemuOpt *opt; > =20 > + if (opts =3D=3D NULL) { > + return; > + } > + > for (;;) { > opt =3D QTAILQ_FIRST(&opts->head); > if (opt =3D=3D NULL) >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --BSwKuiI0eBDnWfjJ9k82jIaUm6Tc4MSak Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTMff2AAoJEKeha0olJ0Nq/9oH/iXiguaIKmnwsMOOvyxBNdKX ci0kfYIkAO4j+CljT9dAqHJHYym9DB6t9WVvf3gcjpdyVZ/zcOu24hqpEzMasDNF Oq5zggOFhMLaOeSx4aFmiCh4V1QH9NtJmQV8WfGUoO0XnIwksGVr6xWDVZJPCbyz OmEQY/enqUEl9UzPa3YSkdXgMqHIpHBdP7AXOtb4bokYSGz/UPtEgiZAxC/ZoKUy zaZnvKeb01gevhi6RPVxL9+B7N9qc72ReRSxvjVZ0OlWTlHaw5Vn1xZSdBaA2xGb 6lKHpzKkFu84v/hVkeGUVFBxke6+ILe8ITGJb+b85irKNXVieWdWleYyzcnpLKA= =hF4I -----END PGP SIGNATURE----- --BSwKuiI0eBDnWfjJ9k82jIaUm6Tc4MSak--