On 28 February 2012 10:24, Florian Fainelli <[email protected]> wrote:
> Le 02/28/12 07:50, Tathagata Das a écrit :
(...)
> +
> + if ((((offset + len)>> 20)> cc->nflash.size) ||
> + ((((offset + len)>> 20) == cc->nflash.size)&&
>
> these two lines are equal to:
>
> ((offset + len)>> 20)>= cc->nflash.size
No they are not, because of the &&:
> + (((offset + len)& ((1<< 20) - 1)) != 0))) {
But they could also be written as
if ((offset + len) > (cc->nflash.size << 20)) {
which would be much more readable IMHO (whether nflash.size needs to
be stored in MB or if it could be stored in bytes and then the shift
avoided is a different question).
Jonas
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel