On 2011 Jul 27 (Wed) at 19:22:34 +0200 (+0200), Jasper Lievisse Adriaanse wrote:
> On Wed, Jul 27, 2011 at 10:58:22AM -0400, Ted Unangst wrote:
> > On Wed, Jul 27, 2011, Otto Moerbeek wrote:
> > 
> > > +#define SETNAME(name) do { names = (name); limit = nitems(name); } while 
> > > (0)
> > 
> > userland is not supposed to use nitems I think?  But it keeps sneaking
> > in because the kernel headers don't protect it.
> That's right. It's used in some places like pcidump, npppd and tmux, but it's
> locally defined as:
> 
> #ifndef nitems
> #define nitems(_a)    (sizeof((_a)) / sizeof((_a)[0]))
> #endif

What is the reason for this not being kosher yet,
and if it's not ment to be, why isn't it protected by _KERNEL ?

Reply via email to