From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MScix-00076N-IY for mharc-grub-devel@gnu.org; Sun, 19 Jul 2009 16:11:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSciw-000768-4U for grub-devel@gnu.org; Sun, 19 Jul 2009 16:11:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MScir-00075Y-JG for grub-devel@gnu.org; Sun, 19 Jul 2009 16:11:05 -0400 Received: from [199.232.76.173] (port=51059 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MScir-00075J-7J for grub-devel@gnu.org; Sun, 19 Jul 2009 16:11:01 -0400 Received: from c60.cesmail.net ([216.154.195.49]:34730) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MSciq-0000ch-6n for grub-devel@gnu.org; Sun, 19 Jul 2009 16:11:00 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 19 Jul 2009 16:10:58 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 717BB34C6A for ; Sun, 19 Jul 2009 16:21:06 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: References: <20090719011129.nnkkuesb4cwwwoos-cebfxv@webmail.spamcop.net> Content-Type: text/plain Date: Sun, 19 Jul 2009 16:10:57 -0400 Message-Id: <1248034257.2519.26.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] AFS fixes and improvements 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: Sun, 19 Jul 2009 20:11:06 -0000 On Sun, 2009-07-19 at 15:20 +0200, Vladimir 'phcoder' Serbinenko wrote: > > - if ((! dir->inode.stream.size) || > > + if ((dir->inode.stream.size == 0) || > > > > The later is marginally better, but it would be easier to review your > > patches if you don't include such changes. > It's not a stylistic improvement. dir->inode.stream.size is 64-bit > quantity which will be truncated on 32-bit platform No, values are not truncated like that. No implicit conversions shorten the value. That worst thing you can get is conversion from signed to unsigned or vice versa, but you will get a warning about it with -Wall. Just try compiling this for 32-bit: #include unsigned long long size = 0x100000000ULL; int main() { if (! size) printf("test1: size is 0\n"); else printf("test1: size is not 0\n"); if (size == 0) printf("test2: size is 0\n"); else printf("test2: size is not 0\n"); } -- Regards, Pavel Roskin