]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/names.c
Don't forget to initialize hdrtype.
[pciutils.git] / lib / names.c
index 896f7c1df23199cddd40f756935c49fd6f9039b1..94225f58efeaae308ac526c5c6e3a50cff24560d 100644 (file)
@@ -1,9 +1,9 @@
 /*
- *     $Id: names.c,v 1.7 2002/03/24 12:14:40 mj Exp $
+ *     $Id: names.c,v 1.9 2002/03/30 15:39:25 mj Exp $
  *
  *     The PCI Library -- ID to Name Translation
  *
- *     Copyright (c) 1997--2002 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     Copyright (c) 1997--2002 Martin Mares <mj@ucw.cz>
  *
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
@@ -98,19 +98,10 @@ parse_name_list(struct pci_access *a)
       lino++;
       q = p;
       while (*p && *p != '\n')
-       {
-         if (*p == '#')
-           {
-             *p++ = 0;
-             while (*p && *p != '\n')
-               p++;
-             break;
-           }
-         p++;
-       }
+       p++;
       if (*p == '\n')
        *p++ = 0;
-      if (!*q)
+      if (!*q || *q == '#')
        continue;
       r = p;
       while (r > q && r[-1] == ' ')