From e2a6cba6516fcfe2c4f3ff73d0f9aa0ba261f548 Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 19 Apr 2016 23:37:24 +0000 Subject: sys/dev: use our nitems() macro when it is avaliable through param.h. No functional change, only trivial cases are done in this sweep, Drivers that can get further enhancements will be done independently. Discussed in: freebsd-current --- sys/dev/mlx/mlx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/mlx') diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index 58eb71b..6d9c49b 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -1364,7 +1364,7 @@ mlx_periodic_eventlog_respond(struct mlx_command *mc) /* Mylex vendor-specific message indicating a drive was killed? */ if ((el->el_sensekey == 9) && (el->el_asc == 0x80)) { - if (el->el_asq < (sizeof(mlx_sense_messages) / sizeof(mlx_sense_messages[0]))) { + if (el->el_asq < nitems(mlx_sense_messages)) { reason = mlx_sense_messages[el->el_asq]; } else { reason = "for unknown reason"; -- cgit v1.1