mirror of
https://github.com/shadow-maint/shadow.git
synced 2024-12-03 06:54:31 +08:00
Add NITEMS(arr) to get the number of elements of an array
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
parent
220b352b70
commit
eb164165f6
@ -171,6 +171,8 @@ static inline void memzero(void *ptr, size_t size)
|
||||
#define SCALE DAY
|
||||
#endif
|
||||
|
||||
#define NITEMS(arr) (sizeof((arr)) / sizeof((arr)[0]))
|
||||
|
||||
/* Copy string pointed by B to array A with size checking. It was originally
|
||||
in lmain.c but is _very_ useful elsewhere. Some setuid root programs with
|
||||
very sloppy coding used to assume that BUFSIZ will always be enough... */
|
||||
|
Loading…
Reference in New Issue
Block a user