Re: dcache shrink list corruption?

From: Szeredi Miklos
Date: Fri May 02 2014 - 04:43:34 EST


On Thu, May 1, 2014 at 4:34 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Thu, May 01, 2014 at 11:42:52AM +0200, Miklos Szeredi wrote:

>> - "bool foo = flag & FLAG" looks suspicious. Is this guaranteed not to
>> overflow?
>
> What do you mean, overflow? It's not a 1-bit unsigned int; conversion to
> _Bool is different (which is the only reason why it's more than mere
> syntax sugar). See C99 6.3.2.1 ("When any scalar value is converted
> to _Bool, the result is 0 if the value compares equal to 0; otherwise,
> the result is 1").

Ah, didn't know that.

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/