Use nitems() from sys/param.h.

MFC after:	2 weeks.
This commit is contained in:
araujo 2016-08-16 15:53:05 +00:00
parent 26a21fb116
commit cc1da273bd

View File

@ -82,11 +82,11 @@ static char pathbuf[MAXPATHLEN + 1];
static const char *allv[] = { static const char *allv[] = {
"rpcgen", "-s", "udp", "-s", "tcp", "rpcgen", "-s", "udp", "-s", "tcp",
}; };
static int allc = sizeof (allv)/sizeof (allv[0]); static int allc = nitems(allv);
static const char *allnv[] = { static const char *allnv[] = {
"rpcgen", "-s", "netpath", "rpcgen", "-s", "netpath",
}; };
static int allnc = sizeof (allnv)/sizeof (allnv[0]); static int allnc = nitems(allnv);
/* /*
* machinations for handling expanding argument list * machinations for handling expanding argument list