Changeset 5b3cf90 in mainline for uspace/srv/pci/libpci/names.c
- Timestamp:
- 2009-08-02T19:38:02Z (14 years ago)
- Branches:
- lfn, master, serial
- Children:
- fa5526d
- Parents:
- f019cc07
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/pci/libpci/names.c
rf019cc07 r5b3cf90 151 151 int nest; 152 152 static const char parse_error[] = "Parse error"; 153 int i;153 size_t i; 154 154 155 155 *lino = 0; … … 331 331 if (num) 332 332 res = snprintf(buf, size, "%04x", iv); 333 else if ( v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0))333 else if ((v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0)) != 0) 334 334 return (char *) v->name; 335 335 else … … 341 341 if (num) 342 342 res = snprintf(buf, size, "%04x", id); 343 else if ( d = id_lookup(a, ID_DEVICE, iv, id, 0, 0))343 else if ((d = id_lookup(a, ID_DEVICE, iv, id, 0, 0)) != 0) 344 344 return (char *) d->name; 345 345 else if (synth) … … 371 371 if (num) 372 372 res = snprintf(buf, size, "%04x", isv); 373 else if ( v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0))373 else if ((v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0)) != 0) 374 374 return (char *) v->name; 375 375 else if (synth) … … 385 385 if (num) 386 386 res = snprintf(buf, size, "%04x", isd); 387 else if ( d = id_lookup_subsys(a, iv, id, isv, isd))387 else if ((d = id_lookup_subsys(a, iv, id, isv, isd)) != 0) 388 388 return (char *) d->name; 389 389 else if (synth) … … 416 416 if (num) 417 417 res = snprintf(buf, size, "%04x", icls); 418 else if ( cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0))418 else if ((cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0)) != 0) 419 419 return (char *) cls->name; 420 else if ( cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0))420 else if ((cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0)) != 0) 421 421 res = snprintf(buf, size, "%s [%04x]", cls->name, icls); 422 422 else if (synth) … … 430 430 if (num) 431 431 res = snprintf(buf, size, "%02x", ipif); 432 else if ( pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0))432 else if ((pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0)) != 0) 433 433 return (char *) pif->name; 434 434 else if (icls == 0x0101 && !(ipif & 0x70)) {
Note: See TracChangeset
for help on using the changeset viewer.