svn commit: r298244 - head/sbin/dumpon

Marcelo Araujo araujo at FreeBSD.org
Tue Apr 19 04:28:26 UTC 2016


Author: araujo
Date: Tue Apr 19 04:28:25 2016
New Revision: 298244
URL: https://svnweb.freebsd.org/changeset/base/298244

Log:
  Use nitems() instead of sizeof(name) / sizeof(*name).
  
  MFC after:	2 weeks.

Modified:
  head/sbin/dumpon/dumpon.c

Modified: head/sbin/dumpon/dumpon.c
==============================================================================
--- head/sbin/dumpon/dumpon.c	Tue Apr 19 03:25:36 2016	(r298243)
+++ head/sbin/dumpon/dumpon.c	Tue Apr 19 04:28:25 2016	(r298244)
@@ -72,7 +72,7 @@ static void
 check_size(int fd, const char *fn)
 {
 	int name[] = { CTL_HW, HW_PHYSMEM };
-	size_t namelen = sizeof(name) / sizeof(*name);
+	size_t namelen = nitems(name);
 	unsigned long physmem;
 	size_t len;
 	off_t mediasize;


More information about the svn-src-head mailing list