Dubious #define in include/pwd.h

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Jan 25 16:40:43 PST 2005


On 2005-01-25 21:46, Steven Smith <sos22 at cantab.net> wrote:
> I was messing around with sparse, the static checker used sometimes
> by Linux kernel people, and I (or rather, it) came upon the line
>
> #define _PW_VERSION_MASK        '0xF0'
>
> in /usr/src/include/pwd.h.  I can't immediately see any use for this;
> '\xf0' would probably be more useful.

If this is used as a mask for 'unsigned char' values, why would it make
any difference?  Aren't they both going to be implicitly converted to
the right typep anyway?



More information about the freebsd-bugs mailing list