From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc15l-0003nq-BS for qemu-devel@nongnu.org; Tue, 05 Jun 2012 17:15:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sc15h-0005fm-Il for qemu-devel@nongnu.org; Tue, 05 Jun 2012 17:15:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sc15h-0005e8-Aq for qemu-devel@nongnu.org; Tue, 05 Jun 2012 17:15:01 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q55LExnd009553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 5 Jun 2012 17:14:59 -0400 Message-ID: <4FCE76D2.9070403@redhat.com> Date: Tue, 05 Jun 2012 15:14:58 -0600 From: Eric Blake MIME-Version: 1.0 References: <1337683555-13301-1-git-send-email-lersek@redhat.com> <1337683555-13301-13-git-send-email-lersek@redhat.com> <4FCE73C8.6030906@redhat.com> In-Reply-To: <4FCE73C8.6030906@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigBEBCA1048156E3E6FD859390" Subject: Re: [Qemu-devel] [PATCH 12/16] convert net_init_socket() to NetClientOptions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Laszlo Ersek , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBEBCA1048156E3E6FD859390 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 06/05/2012 03:02 PM, Paolo Bonzini wrote: > Il 22/05/2012 12:45, Laszlo Ersek ha scritto: >> + if (sock->has_fd + sock->has_listen + sock->has_connect + sock->h= as_mcast + >> + sock->has_udp !=3D 1) { >=20 > Please add a cast, this doesn't work with C99 bool. Huh? Where does C99 state that? 6.3.1.8 states that 'usual arithmetic conversions' consists of first performing integer promotions (and _Bool promotes to int), then if both sides of the operand are the same promoted type, no further conversion is performed. bool + bool therefore undergoes integer promotion to int + int and the result can be > 1. Perhaps you are thinking of the gnulib replacement, where the usual arithmetic conventions of gnulib's replacement 'bool' do not always coincide with C99 semantics? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigBEBCA1048156E3E6FD859390 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPznbSAAoJEKeha0olJ0NqDd8IAKZAALjcfqUsMAvGWd0KOZ4t 8Xljuowm+DJ29/wD8pY5g3xN6lhjg+8M7gdhtg3FhrFkldypjbjOJ/HzGaFvgkQV icfIpO4enl7EFW9AjYJqLySJxF2x+gixPhpyzmrr7e8CAEjw5NsaB2bI3GBX1o7f L1GIiekD/r+/EaIpDmEpsbAeWllKNhdtg0Jr+zlm337LmAM8GHzSyghhMi7CdHRp jEDn/iIfNpc4kReA3hhgMnLWoI3bT97M+jfReooqWuxZeegVMB/tm5ehonRruUOU gpF8NgR9Ili74W1pt98uv5IFoEKVqcbnFnqPhfu9Dng/x5/9hFbJocS5srGhUNU= =qP5T -----END PGP SIGNATURE----- --------------enigBEBCA1048156E3E6FD859390--