1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

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.
This commit is contained in:
John Baldwin 2003-04-09 21:24:23 +00:00
parent e7d9d9217c
commit 685a76429a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113306

View File

@ -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 &&