diff options
author | peter <peter@FreeBSD.org> | 2000-10-15 09:32:58 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-10-15 09:32:58 +0000 |
commit | 72f413de0ca4e436042001acf91d4e9445a4f09f (patch) | |
tree | 36ec6c55bfa54876c732fc64131de187ebf8a2e9 /sys/pc98 | |
parent | f8f70f4f5cbfb5dab85f9730c7bb27cf65b40613 (diff) | |
download | FreeBSD-src-72f413de0ca4e436042001acf91d4e9445a4f09f.zip FreeBSD-src-72f413de0ca4e436042001acf91d4e9445a4f09f.tar.gz |
Clean up as in isa/* - resource_query_string() loop cosmetic tweaks.
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/fdc.c | 7 | ||||
-rw-r--r-- | sys/pc98/pc98/fd.c | 7 | ||||
-rw-r--r-- | sys/pc98/pc98/wd.c | 5 |
3 files changed, 10 insertions, 9 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index c72c41e..e1f2923 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -1042,6 +1042,7 @@ fdc_attach(device_t dev) { struct fdc_data *fdc; int i, error; + const char *name; fdc = device_get_softc(dev); error = fdc_alloc_resources(fdc); @@ -1079,9 +1080,9 @@ fdc_attach(device_t dev) * Probe and attach any children. We should probably detect * devices from the BIOS unless overridden. */ - for (i = resource_query_string(-1, "at", device_get_nameunit(dev)); - i != -1; - i = resource_query_string(i, "at", device_get_nameunit(dev))) + name = device_get_nameunit(dev); + i = -1; + while ((i = resource_query_string(i, "at", name)) != -1) fdc_add_child(dev, resource_query_name(i), resource_query_unit(i)); diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c index c72c41e..e1f2923 100644 --- a/sys/pc98/pc98/fd.c +++ b/sys/pc98/pc98/fd.c @@ -1042,6 +1042,7 @@ fdc_attach(device_t dev) { struct fdc_data *fdc; int i, error; + const char *name; fdc = device_get_softc(dev); error = fdc_alloc_resources(fdc); @@ -1079,9 +1080,9 @@ fdc_attach(device_t dev) * Probe and attach any children. We should probably detect * devices from the BIOS unless overridden. */ - for (i = resource_query_string(-1, "at", device_get_nameunit(dev)); - i != -1; - i = resource_query_string(i, "at", device_get_nameunit(dev))) + name = device_get_nameunit(dev); + i = -1; + while ((i = resource_query_string(i, "at", name)) != -1) fdc_add_child(dev, resource_query_name(i), resource_query_unit(i)); diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c index 54ac1e2..cf8842c 100644 --- a/sys/pc98/pc98/wd.c +++ b/sys/pc98/pc98/wd.c @@ -490,9 +490,8 @@ wdattach(struct isa_device *dvp) bioq_init(&wdtab[dvp->id_unit].controller_queue); sprintf(buf, "wdc%d", dvp->id_unit); - for (i = resource_query_string(-1, "at", buf); - i != -1; - i = resource_query_string(i, "at", buf)) { + i = -1; + while ((i = resource_query_string(i, "at", buf)) != -1) { if (strcmp(resource_query_name(i), "wd")) /* Avoid a bit of foot shooting. */ continue; |