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

-- 
Cheers,
Jasper

"Capable, generous men do not create victims, they nurture them."

Reply via email to