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[])
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to