svn commit: r304226 - head/usr.bin/rpcgen
Marcelo Araujo
araujo at FreeBSD.org
Tue Aug 16 15:53:06 UTC 2016
Author: araujo
Date: Tue Aug 16 15:53:05 2016
New Revision: 304226
URL: https://svnweb.freebsd.org/changeset/base/304226
Log:
Use nitems() from sys/param.h.
MFC after: 2 weeks.
Modified:
head/usr.bin/rpcgen/rpc_main.c
Modified: head/usr.bin/rpcgen/rpc_main.c
==============================================================================
--- head/usr.bin/rpcgen/rpc_main.c Tue Aug 16 15:52:10 2016 (r304225)
+++ head/usr.bin/rpcgen/rpc_main.c Tue Aug 16 15:53:05 2016 (r304226)
@@ -82,11 +82,11 @@ static char pathbuf[MAXPATHLEN + 1];
static const char *allv[] = {
"rpcgen", "-s", "udp", "-s", "tcp",
};
-static int allc = sizeof (allv)/sizeof (allv[0]);
+static int allc = nitems(allv);
static const char *allnv[] = {
"rpcgen", "-s", "netpath",
};
-static int allnc = sizeof (allnv)/sizeof (allnv[0]);
+static int allnc = nitems(allnv);
/*
* machinations for handling expanding argument list
More information about the svn-src-head
mailing list