> 1) Signedness, what you have discovered.
>
> 2) Arg evaluation.
Damn, I always assumed that min/max are macros and took into account #2,
which was painful sometimes. :-)
The fact that it is defined in sock.h (and the definition is truly
crazy, add #4: it is funny what happens on 64bit archs, when one of args
happens to be long)
> 1) have standard inline functions with names that suggest the
> signedness, much like Rusty's netfilter macros.
min/max are macros. I do not know how to make a valid inline
for it: cast to long has problems with unsigned longs, cast to unsigned long
have the same problems with signedness.
Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/