From f18e52f46e18b9036a60aa28fe6603962c885d3e Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Sat, 30 Jul 2016 07:15:54 +0000 Subject: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) --- usr.bin/procstat/procstat_files.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'usr.bin/procstat/procstat_files.c') diff --git a/usr.bin/procstat/procstat_files.c b/usr.bin/procstat/procstat_files.c index ae7928dece7d..162669792af3 100644 --- a/usr.bin/procstat/procstat_files.c +++ b/usr.bin/procstat/procstat_files.c @@ -235,8 +235,7 @@ static struct cap_desc { { CAP_SOCK_CLIENT, "scl" }, { CAP_SOCK_SERVER, "ssr" }, }; -static const u_int cap_desc_count = sizeof(cap_desc) / - sizeof(cap_desc[0]); +static const u_int cap_desc_count = nitems(cap_desc); static u_int width_capability(cap_rights_t *rightsp) -- cgit v1.2.3