summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-04-09 21:24:23 +0000
committerjhb <jhb@FreeBSD.org>2003-04-09 21:24:23 +0000
commit4f61f946f2491bfa5d36414736158af599d4c791 (patch)
tree135546dfb530d4fd7fb562f5ae434e6d5cbaacb7 /sys
parentf514349f09ea64c630ed12ee1b79a2f09fa14d96 (diff)
downloadFreeBSD-src-4f61f946f2491bfa5d36414736158af599d4c791.zip
FreeBSD-src-4f61f946f2491bfa5d36414736158af599d4c791.tar.gz
Fix a logic bug in previous commit (use || rather than &&). In order to
terminate the loop only when both the name and vendor are zero, we should keep looping so long as either one is not zero.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pccard/pccard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c
index dec174c..f0a2792 100644
--- a/sys/dev/pccard/pccard.c
+++ b/sys/dev/pccard/pccard.c
@@ -339,7 +339,7 @@ pccard_do_product_lookup(device_t bus, device_t dev,
return (NULL);
if (pccard_get_product_str(dev, &prodstr))
return (NULL);
- for (ent = tab; ent->pp_name != NULL && ent->pp_vendor != 0; ent =
+ for (ent = tab; ent->pp_name != NULL || ent->pp_vendor != 0; ent =
(const struct pccard_product *) ((const char *) ent + ent_size)) {
matches = 1;
if (ent->pp_vendor == PCCARD_VENDOR_ANY &&
OpenPOWER on IntegriCloud