Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2016 07:04:47 +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: r303543 - head/usr.bin/locale
Message-ID:  <201607300704.u6U74lXF094844@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Sat Jul 30 07:04:46 2016
New Revision: 303543
URL: https://svnweb.freebsd.org/changeset/base/303543

Log:
  Use nitems() from sys/param.h.
  
  MFC after:	2 weeks.
  Sponsored by:	gandi.net (BSD Day Taiwan)

Modified:
  head/usr.bin/locale/locale.c

Modified: head/usr.bin/locale/locale.c
==============================================================================
--- head/usr.bin/locale/locale.c	Sat Jul 30 07:02:33 2016	(r303542)
+++ head/usr.bin/locale/locale.c	Sat Jul 30 07:04:46 2016	(r303543)
@@ -220,10 +220,10 @@ struct _kwinfo {
 	  "(POSIX legacy)" }					/* compat */
 
 };
-#define	NKWINFO (sizeof(kwinfo)/sizeof(kwinfo[0]))
+#define	NKWINFO (nitems(kwinfo))
 
 const char *boguslocales[] = { "UTF-8" };
-#define	NBOGUS	(sizeof(boguslocales)/sizeof(boguslocales[0]))
+#define	NBOGUS	(nitems(boguslocales))
 
 int
 main(int argc, char *argv[])



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