Re: hmm..

From: viro
Date: Wed Dec 31 2003 - 08:45:28 EST


On Thu, Dec 25, 2003 at 02:56:37AM -0500, Valdis.Kletnieks@xxxxxx wrote:
> work-around because IBM refused to fix it on the grounds that the VALC macro
> was to protect against a SEGV if the macro was fed an 'int' rather than a
> 'char' (why they didn't just use 'mask[__c & 255]' is beyond me), and that you

Err...

a) is...() must be able to deal with any value that fits into unsigned char
and with EOF. Behaviour on anything else is undefined, so their argument
is obviously bogus.

b) mask[__c & 255] is _not_ a solution, simply because EOF and 255 might
have different properties. Doesn't apply to kernel, but our is...()
do not bother with EOF at all. Userland ones have to.
-
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/