svn commit: r303543 - head/usr.bin/locale
Marcelo Araujo
araujo at FreeBSD.org
Sat Jul 30 07:04:48 UTC 2016
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[])
More information about the svn-src-all
mailing list