aboutsummaryrefslogtreecommitdiff
path: root/sbin/camcontrol/zone.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/camcontrol/zone.c')
-rw-r--r--sbin/camcontrol/zone.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/camcontrol/zone.c b/sbin/camcontrol/zone.c
index d651ca0e2acf..dc87cd9a9570 100644
--- a/sbin/camcontrol/zone.c
+++ b/sbin/camcontrol/zone.c
@@ -34,10 +34,9 @@
* This is an implementation of the SCSI ZBC and ATA ZAC specs.
*/
-#include <sys/cdefs.h>
+#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/stdint.h>
-#include <sys/types.h>
#include <sys/endian.h>
#include <sys/sbuf.h>
#include <sys/queue.h>
@@ -353,7 +352,7 @@ zone(struct cam_device *device, int argc, char **argv, char *combinedopt,
int entry_num;
status = scsi_get_nv(zone_cmd_map,
- (sizeof(zone_cmd_map) / sizeof(zone_cmd_map[0])),
+ nitems(zone_cmd_map),
optarg, &entry_num, SCSI_NV_FLAG_IG_CASE);
if (status == SCSI_NV_FOUND)
action = zone_cmd_map[entry_num].value;
@@ -387,7 +386,7 @@ zone(struct cam_device *device, int argc, char **argv, char *combinedopt,
int entry_num;
status = scsi_get_nv(zone_rep_opts,
- (sizeof(zone_rep_opts) /sizeof(zone_rep_opts[0])),
+ nitems(zone_rep_opts),
optarg, &entry_num, SCSI_NV_FLAG_IG_CASE);
if (status == SCSI_NV_FOUND)
rep_option = zone_rep_opts[entry_num].value;