Date: Wed, 26 Jan 2005 11:11:45 -0600 From: "Jacques A. Vidrine" <nectar@FreeBSD.org> To: Stefan Farfeleder <stefan@fafoe.narf.at> Cc: sos22@cantab.net Subject: Re: Dubious #define in include/pwd.h Message-ID: <20050126171145.GG1441@lum.celabo.org> In-Reply-To: <20050126101332.GI21084@wombat.fafoe.narf.at> References: <20050126101332.GI21084@wombat.fafoe.narf.at>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 26, 2005 at 11:13:34AM +0100, Stefan Farfeleder wrote: > Giorgos Keramidas wrote: > > 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? > > No, '0xF0' is a multi-character-constant, its value is implementation-defined > and that's probably not what Jacques (CC'ed) intended. It probably > should be just 0xF0 (without the quotes) or '\xF0'. A grep through the > src tree didn't show any usage of this macro though. Er, yes, that's a typo (^_^;) Fortunately, that define is not used. I'll correct it. Is there a PR associated with this? Cheers, -- Jacques A Vidrine / NTT/Verio nectar@celabo.org / jvidrine@verio.net / nectar@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050126171145.GG1441>