From 793128cc2c2df73008e4928b2441bc0513a9ff6e Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Sat, 11 Mar 2017 04:00:27 +0000 Subject: [PATCH] Use nitems() from sys/param.h Reviewed by: jhb MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9941 --- usr.sbin/boot0cfg/boot0cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c index c2cb91de416..9670af95c9c 100644 --- a/usr.sbin/boot0cfg/boot0cfg.c +++ b/usr.sbin/boot0cfg/boot0cfg.c @@ -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";