From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgfWb-0002Bd-Bw for qemu-devel@nongnu.org; Thu, 27 Aug 2009 10:00:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgfWW-0002BQ-9R for qemu-devel@nongnu.org; Thu, 27 Aug 2009 10:00:25 -0400 Received: from [199.232.76.173] (port=38678 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgfWW-0002BN-1c for qemu-devel@nongnu.org; Thu, 27 Aug 2009 10:00:20 -0400 Received: from mail-bw0-f227.google.com ([209.85.218.227]:57742) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgfWV-0002hO-KV for qemu-devel@nongnu.org; Thu, 27 Aug 2009 10:00:19 -0400 Received: by bwz27 with SMTP id 27so1018069bwz.34 for ; Thu, 27 Aug 2009 07:00:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090827124546.GA5912@1und1.de> References: <1251376284-22426-1-git-send-email-amit.shah@redhat.com> <20090827124546.GA5912@1und1.de> Date: Thu, 27 Aug 2009 16:00:17 +0200 Message-ID: <761ea48b0908270700i32fbaab9kb23d3cd2bfd09ebe@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] Remove typedef for bool from eepro100.c From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, Aug 27, 2009 at 2:45 PM, Reimar D=F6ffinger wrote: > 1) stdbool bool is probably 4 bytes, not just 1 like char It's one byte on my gcc 4.4.0. > I suggest to just get rid of bool in this file, it is only used in 5 > places, i.e. change >> =A0 =A0 =A0 =A0bool bit_el =3D ((command & 0x8000) !=3D 0); > to >> =A0 =A0 =A0 =A0int bit_el =3D command & 0x8000; This is dangerous if you start using bit_el in integer expressions by accident (for instance using & or |). Laurent