Date: Fri, 10 Mar 2017 04:24:21 +0000 (UTC) From: Marcelo Araujo <araujo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314987 - head/usr.sbin/camdd Message-ID: <201703100424.v2A4OLrI038423@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: araujo Date: Fri Mar 10 04:24:21 2017 New Revision: 314987 URL: https://svnweb.freebsd.org/changeset/base/314987 Log: Use nitems() from sys/param.h. Reviewed by: asomers MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9944 Modified: head/usr.sbin/camdd/camdd.c Modified: head/usr.sbin/camdd/camdd.c ============================================================================== --- head/usr.sbin/camdd/camdd.c Fri Mar 10 03:31:29 2017 (r314986) +++ head/usr.sbin/camdd/camdd.c Fri Mar 10 04:24:21 2017 (r314987) @@ -1004,8 +1004,7 @@ camdd_probe_tape(int fd, char *filename, 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703100424.v2A4OLrI038423>