Author: araujo
Date: Sat Jul 30 07:06:23 2016
New Revision: 303545
URL: https://svnweb.freebsd.org/changeset/base/303545

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

Modified:
  head/usr.bin/netstat/pfkey.c

Modified: head/usr.bin/netstat/pfkey.c
==============================================================================
--- head/usr.bin/netstat/pfkey.c        Sat Jul 30 07:05:32 2016        
(r303544)
+++ head/usr.bin/netstat/pfkey.c        Sat Jul 30 07:06:23 2016        
(r303545)
@@ -101,8 +101,7 @@ static const char *pfkey_msgtype_names (
 static const char *
 pfkey_msgtype_names(int x)
 {
-       const int max =
-           sizeof(pfkey_msgtypenames)/sizeof(pfkey_msgtypenames[0]);
+       const int max = nitems(pfkey_msgtypenames);
        static char buf[20];
 
        if (x < max && pfkey_msgtypenames[x])
_______________________________________________
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