Use nitems() from sys/param.h.

Reviewed by:	asomers
MFC after:	3 weeks.
Differential Revision:	https://reviews.freebsd.org/D9944
This commit is contained in:
araujo 2017-03-10 04:24:21 +00:00
parent 56cb3fb0c6
commit 3f60b38d86

View File

@ -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);