aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/wbwd
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-04-19 23:37:24 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-04-19 23:37:24 +0000
commit73a1170a8c41cb848f17cc0a8839e9dcee3d126e (patch)
tree346d2ff1b645f831d2f412a7a4be3f6eb1c711b4 /sys/dev/wbwd
parent4ec642f1d61bbab5998f7b19281396ee925f82f0 (diff)
Notes
Diffstat (limited to 'sys/dev/wbwd')
-rw-r--r--sys/dev/wbwd/wbwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/wbwd/wbwd.c b/sys/dev/wbwd/wbwd.c
index 75fbea4a5933..7ed2d487e72b 100644
--- a/sys/dev/wbwd/wbwd.c
+++ b/sys/dev/wbwd/wbwd.c
@@ -619,7 +619,7 @@ wb_probe_enable(device_t dev, int probe)
error = ENXIO;
found = 0;
- for (i = 0; i < sizeof(probe_addrs) / sizeof(*probe_addrs); i++) {
+ for (i = 0; i < nitems(probe_addrs); i++) {
if (sc != NULL) {
/* Allocate bus resources for IO index/data register access. */
@@ -657,7 +657,7 @@ wb_probe_enable(device_t dev, int probe)
goto cleanup;
}
- for (j = 0; j < sizeof(wb_devs) / sizeof(*wb_devs); j++) {
+ for (j = 0; j < nitems(wb_devs); j++) {
if (wb_devs[j].device_id == dev_id) {
found = 1;
break;