Changeset cb0ea39 in mainline for uspace/app/lspci/libpci/names.c


Ignore:
Timestamp:
2009-08-09T13:56:50Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
24f27bb
Parents:
24edc18
Message:

dd: initial import of the original svn branch

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/lspci/libpci/names.c

    r24edc18 rcb0ea39  
    151151        int nest;
    152152        static const char parse_error[] = "Parse error";
    153         size_t i;
     153        int i;
    154154
    155155        *lino = 0;
     
    331331                if (num)
    332332                        res = snprintf(buf, size, "%04x", iv);
    333                 else if ((v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0)) != 0)
     333                else if (v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0))
    334334                        return (char *) v->name;
    335335                else
     
    341341                if (num)
    342342                        res = snprintf(buf, size, "%04x", id);
    343                 else if ((d = id_lookup(a, ID_DEVICE, iv, id, 0, 0)) != 0)
     343                else if (d = id_lookup(a, ID_DEVICE, iv, id, 0, 0))
    344344                        return (char *) d->name;
    345345                else if (synth)
     
    371371                if (num)
    372372                        res = snprintf(buf, size, "%04x", isv);
    373                 else if ((v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0)) != 0)
     373                else if (v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0))
    374374                        return (char *) v->name;
    375375                else if (synth)
     
    385385                if (num)
    386386                        res = snprintf(buf, size, "%04x", isd);
    387                 else if ((d = id_lookup_subsys(a, iv, id, isv, isd)) != 0)
     387                else if (d = id_lookup_subsys(a, iv, id, isv, isd))
    388388                        return (char *) d->name;
    389389                else if (synth)
     
    416416                if (num)
    417417                        res = snprintf(buf, size, "%04x", icls);
    418                 else if ((cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0)) != 0)
     418                else if (cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0))
    419419                        return (char *) cls->name;
    420                 else if ((cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0)) != 0)
     420                else if (cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0))
    421421                        res = snprintf(buf, size, "%s [%04x]", cls->name, icls);
    422422                else if (synth)
     
    430430                if (num)
    431431                        res = snprintf(buf, size, "%02x", ipif);
    432                 else if ((pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0)) != 0)
     432                else if (pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0))
    433433                        return (char *) pif->name;
    434434                else if (icls == 0x0101 && !(ipif & 0x70)) {
Note: See TracChangeset for help on using the changeset viewer.