summaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-09-22 07:15:32 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-09-22 07:15:32 +0000
commita470520b2712960466a2020f4a1707423d3eabf5 (patch)
tree6ffa1d934e937bbce8612517708731eb26f487d2 /sys/cam
parent21be3f39bfaf366962f16493d46a07927d9221e3 (diff)
Notes
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_periph.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index 44710528a970..e04fdb896b4f 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -330,12 +330,11 @@ camperiphunit(struct periph_driver *p_drv, path_id_t pathid,
char pathbuf[32], *strval, *periph_name;
unit = 0;
- hit = 0;
periph_name = p_drv->driver_name;
snprintf(pathbuf, sizeof(pathbuf), "scbus%d", pathid);
i = -1;
- while ((i = resource_locate(i, periph_name)) != -1) {
+ for (hit = 0; (i = resource_locate(i, periph_name)) != -1; hit = 0) {
dname = resource_query_name(i);
dunit = resource_query_unit(i);
if (resource_string_value(dname, dunit, "at", &strval) == 0) {