From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LargC-0007uA-Gt for mharc-grub-devel@gnu.org; Sat, 21 Feb 2009 08:14:05 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Larg9-0007rr-R3 for grub-devel@gnu.org; Sat, 21 Feb 2009 08:14:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Larg7-0007pd-Nh for grub-devel@gnu.org; Sat, 21 Feb 2009 08:14:01 -0500 Received: from [199.232.76.173] (port=49395 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Larg7-0007pU-90 for grub-devel@gnu.org; Sat, 21 Feb 2009 08:13:59 -0500 Received: from aybabtu.com ([69.60.117.155]:44706) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Larg6-0007i3-Uk for grub-devel@gnu.org; Sat, 21 Feb 2009 08:13:59 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1LarZa-0006x4-CR for grub-devel@gnu.org; Sat, 21 Feb 2009 14:07:14 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1Larg3-0004Dw-EU for grub-devel@gnu.org; Sat, 21 Feb 2009 14:13:55 +0100 Date: Sat, 21 Feb 2009 14:13:55 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090221131355.GF16068@thorin> References: <1234225160.10940.25.camel@localhost> <1234259444.3416.8.camel@fz.local> <1234266254.7325.12.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1234266254.7325.12.camel@localhost> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] r1986 broke FAT detection X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2009 13:14:02 -0000 On Tue, Feb 10, 2009 at 12:44:14PM +0100, Javier Martín wrote: > > > You're welcome. I see that nevertheless the "0 != " comparisons were > substituted for standard C int-to-bool-conversion-based comparisons. > Maybe people should know the signature _and_ semantic contract of > strncmp, but frequently they don't (I had to look it up in the > handbook), and while the code that was committed may look like an > "obvious error" to a wanderer (because, of course, comparison functions > should return a semantic-bool, shouldn't they?), the version with the > explicit "0 != " checks at least looks like it was written like that _on > purpose_ (and the actual binary cost should be zero with any sensible > compiler), thus making future developers on bug-fixing quests at least > scratch their heads before proposing the change to the "if (!strncmp)" > error. So, keeping the coding style consistent is important, but I think > a balance with readability is in order. Thus, you are the maintainers > and you know what you're doing, but I think it's not worth to keep the > coding style so strict as to become confusing. I think you're confusing things. C has no boolean type. I know strcmp gives more info than just a semantic boolean, but in this case it's not interesting to us. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."