summaryrefslogtreecommitdiff
path: root/sys/dev/std
diff options
context:
space:
mode:
authorjmc <jmc@NetBSD.org>2002-05-23 00:10:46 +0000
committerjmc <jmc@NetBSD.org>2002-05-23 00:10:46 +0000
commitdeed1e1714de9253a9c455bc9a8f6f737230b9d7 (patch)
tree96544ed897bb6c2964fafbeaa91cbfae5bc82b9b /sys/dev/std
parent89b73d6b182adb2336860daf4096a1714faad562 (diff)
Fix bug in the way the config_found loop runs. Passing NULL doesn't work well.
Diffstat (limited to 'sys/dev/std')
-rw-r--r--sys/dev/std/ieee1212.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/std/ieee1212.c b/sys/dev/std/ieee1212.c
index 7e4814a6c5d..d81ab850070 100644
--- a/sys/dev/std/ieee1212.c
+++ b/sys/dev/std/ieee1212.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee1212.c,v 1.2 2002/04/02 10:10:54 jmc Exp $ */
+/* $NetBSD: ieee1212.c,v 1.3 2002/05/23 00:10:46 jmc Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -1233,7 +1233,7 @@ p1212_match_units(struct device *sc, struct p1212_dir *dir,
P1212_FIND_SEARCHALL|P1212_FIND_RETURNALL);
if (udirs) {
- while (*udirs++) {
+ do {
dev = config_found_sm(sc, udirs, print, NULL);
if (dev && numdev) {
devret = realloc(devret,
@@ -1245,7 +1245,8 @@ p1212_match_units(struct device *sc, struct p1212_dir *dir,
devret[0] = dev;
numdev++;
}
- }
+ udirs++;
+ } while (*udirs);
}
if (numdev == 0) {
free(devret, M_DEVBUF);