From 4902b81f99fbf75bd3a452a8880a33249d3ebf29 Mon Sep 17 00:00:00 2001 From: araujo Date: Sat, 30 Jul 2016 07:15:54 +0000 Subject: [PATCH] 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(-) 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)