svn commit: r315046 - head/usr.sbin/boot0cfg

Marcelo Araujo araujo at FreeBSD.org
Sat Mar 11 04:00:28 UTC 2017


Author: araujo
Date: Sat Mar 11 04:00:27 2017
New Revision: 315046
URL: https://svnweb.freebsd.org/changeset/base/315046

Log:
  Use nitems() from sys/param.h
  
  Reviewed by:	jhb
  MFC after:	3 weeks.
  Differential Revision:	https://reviews.freebsd.org/D9941

Modified:
  head/usr.sbin/boot0cfg/boot0cfg.c

Modified: head/usr.sbin/boot0cfg/boot0cfg.c
==============================================================================
--- head/usr.sbin/boot0cfg/boot0cfg.c	Sat Mar 11 03:01:18 2017	(r315045)
+++ head/usr.sbin/boot0cfg/boot0cfg.c	Sat Mar 11 04:00:27 2017	(r315046)
@@ -88,7 +88,7 @@ static const struct {
     {"update", 1},
     {"setdrv", 0}
 };
-static const int nopt = sizeof(opttbl) / sizeof(opttbl[0]);
+static const int nopt = nitems(opttbl);
 
 static const char fmt0[] = "#   flag     start chs   type"
     "       end chs       offset         size\n";


More information about the svn-src-head mailing list