From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy30L-0004Yb-C9 for qemu-devel@nongnu.org; Thu, 28 May 2015 14:58:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy30F-0001Zy-LK for qemu-devel@nongnu.org; Thu, 28 May 2015 14:58:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy30F-0001Zm-FH for qemu-devel@nongnu.org; Thu, 28 May 2015 14:58:03 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id B28E737C806 for ; Thu, 28 May 2015 18:58:02 +0000 (UTC) Message-ID: <55676535.1020406@redhat.com> Date: Thu, 28 May 2015 12:57:57 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432815695-31687-1-git-send-email-armbru@redhat.com> <1432815695-31687-8-git-send-email-armbru@redhat.com> In-Reply-To: <1432815695-31687-8-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BxdI0DD1OIl0Oji1I3dBbPLBVxUUfrTGK" Subject: Re: [Qemu-devel] [PATCH 7/9] QemuOpts: Drop qemu_opt_foreach() parameter abort_on_failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BxdI0DD1OIl0Oji1I3dBbPLBVxUUfrTGK Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/28/2015 06:21 AM, Markus Armbruster wrote: > When the argument is non-zero, qemu_opt_foreach() stops on callback > returning non-zero, and returns that value. >=20 > When the argument is zero, it doesn't stop, and returns the callback's > value from the last iteration. >=20 > The two callers that pass zero could just as well pass one: >=20 > * qemu_spice_init()'s callback add_channel() either returns zero or > exit()s. >=20 > * config_write_opts()'s callback config_write_opt() always returns > zero. >=20 > Drop the parameter, and always stop. >=20 > Signed-off-by: Markus Armbruster > --- > +++ b/net/vhost-user.c > @@ -185,7 +185,7 @@ static CharDriverState *net_vhost_parse_chardev(con= st NetdevVhostUserOptions *op > =20 > /* inspect chardev opts */ > memset(&props, 0, sizeof(props)); > - if (qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props, tr= ue) !=3D 0) { > + if (qemu_opt_foreach(chr->opts, net_vhost_chardev_opts, &props)) {= Another case of confusion on 'int' vs. 'bool' gone. Good riddance! Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --BxdI0DD1OIl0Oji1I3dBbPLBVxUUfrTGK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVZ2U1AAoJEKeha0olJ0NqfyoH/34NQWj6Zh0qZL7spTa4VaLR PFb3G9Nt6paLdQq925ScQ8yuzfi4VEAx1ZXLgBh3XHVTX6z2+VMofiC2ExrDQFjy QhmVThH/te70Ibk/EckrOum3+A6MErXdIK0u6Nu3GQ7n9y+oqf+Nwi6sBBfpJqEZ f0l2sz0glWztpakLnFOF0N/8IPj9YCjH4FdnNokQLkSKj35qmxFP7N2z60fDCpg5 HdjFa6narg5eMxPNPnokEceSEtxaK79WI0r980iHEMeaZtLfHXmpymnYc/kLlYzu gSbXSXjdxa7kKv5GoDM/XWKmGLcjzZd6rqU19XSLp1NShjyTESd3lUxDVkyxGJg= =HImH -----END PGP SIGNATURE----- --BxdI0DD1OIl0Oji1I3dBbPLBVxUUfrTGK--