From 3f60b38d86729dc7bcfc16ce33ad4f5eb1c3e02a Mon Sep 17 00:00:00 2001 From: araujo Date: Fri, 10 Mar 2017 04:24:21 +0000 Subject: [PATCH] Use nitems() from sys/param.h. Reviewed by: asomers MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9944 --- usr.sbin/camdd/camdd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/camdd/camdd.c b/usr.sbin/camdd/camdd.c index e360723d82a0..a51bd7d43c7a 100644 --- a/usr.sbin/camdd/camdd.c +++ b/usr.sbin/camdd/camdd.c @@ -1004,8 +1004,7 @@ camdd_probe_tape(int fd, char *filename, uint64_t *max_iosize, goto bailout; } - for (i = 0; i < sizeof(req_status_items) / - sizeof(req_status_items[0]); i++) { + for (i = 0; i < nitems(req_status_items); i++) { char *name; name = __DECONST(char *, req_status_items[i].name);