Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2016 09:43:51 +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: r298261 - head/sbin/setkey
Message-ID:  <201604190943.u3J9hpwW040797@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Tue Apr 19 09:43:51 2016
New Revision: 298261
URL: https://svnweb.freebsd.org/changeset/base/298261

Log:
  Use nitems() from sys/param.h.
  
  MFC after:	2 weeks.

Modified:
  head/sbin/setkey/test-policy.c

Modified: head/sbin/setkey/test-policy.c
==============================================================================
--- head/sbin/setkey/test-policy.c	Tue Apr 19 09:42:48 2016	(r298260)
+++ head/sbin/setkey/test-policy.c	Tue Apr 19 09:43:51 2016	(r298261)
@@ -76,7 +76,7 @@ main()
 	int i;
 	char *buf;
 
-	for (i = 0; i < sizeof(requests)/sizeof(requests[0]); i++) {
+	for (i = 0; i < nitems(requests); i++) {
 		printf("* requests:[%s]\n", requests[i]);
 		if ((buf = setpolicy(requests[i])) == NULL)
 			continue;



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