Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Aug 2016 15:53:05 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304226 - head/usr.bin/rpcgen
Message-ID:  <201608161553.u7GFr5LE055627@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608161553.u7GFr5LE055627>