[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] AFS fixes and improvements
From: |
Vladimir 'phcoder' Serbinenko |
Subject: |
Re: [PATCH] AFS fixes and improvements |
Date: |
Sun, 19 Jul 2009 22:18:58 +0200 |
On Sun, Jul 19, 2009 at 10:10 PM, Pavel Roskin<address@hidden> wrote:
> 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:
>
You're right. Such a problem was pointed to me once by Yoshinori K
Okuji and I accepted it without really checking. Anyway with == 0 it's
sure to work and we both agree that it is a bit more readable even if
technically equivalent
> --
> Regards,
> Pavel Roskin
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'phcoder' Serbinenko
Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
- Re: [PATCH] AFS fixes and improvements, (continued)
- Re: [PATCH] AFS fixes and improvements, Pavel Roskin, 2009/07/19
- Re: [PATCH] AFS fixes and improvements, Vladimir 'phcoder' Serbinenko, 2009/07/19
- Re: [PATCH] AFS fixes and improvements, Pavel Roskin, 2009/07/19
- Re: [PATCH] AFS fixes and improvements, Vladimir 'phcoder' Serbinenko, 2009/07/19
- Re: [PATCH] AFS fixes and improvements, Pavel Roskin, 2009/07/19
- Re: [PATCH] AFS fixes and improvements, Vladimir 'phcoder' Serbinenko, 2009/07/20
- Re: [PATCH] AFS fixes and improvements, Pavel Roskin, 2009/07/20
- Re: [PATCH] AFS fixes and improvements, Vladimir 'phcoder' Serbinenko, 2009/07/20
- Re: [PATCH] AFS fixes and improvements, Pavel Roskin, 2009/07/20
- Re: [PATCH] AFS fixes and improvements, Pavel Roskin, 2009/07/19
- Re: [PATCH] AFS fixes and improvements,
Vladimir 'phcoder' Serbinenko <=