|
|
998739 |
diff -up pciutils-3.5.6/lib/init.c.vafix pciutils-3.5.6/lib/init.c
|
|
|
998739 |
--- pciutils-3.5.6/lib/init.c.vafix 2018-08-21 15:44:16.245141888 +0200
|
|
|
998739 |
+++ pciutils-3.5.6/lib/init.c 2018-08-21 16:31:06.836445935 +0200
|
|
|
998739 |
@@ -98,6 +98,7 @@ pci_generic_error(char *msg, ...)
|
|
|
998739 |
va_start(args, msg);
|
|
|
998739 |
fputs("pcilib: ", stderr);
|
|
|
998739 |
vfprintf(stderr, msg, args);
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
fputc('\n', stderr);
|
|
|
998739 |
exit(1);
|
|
|
998739 |
}
|
|
|
998739 |
@@ -110,6 +111,7 @@ pci_generic_warn(char *msg, ...)
|
|
|
998739 |
va_start(args, msg);
|
|
|
998739 |
fputs("pcilib: ", stderr);
|
|
|
998739 |
vfprintf(stderr, msg, args);
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
fputc('\n', stderr);
|
|
|
998739 |
}
|
|
|
998739 |
|
|
|
998739 |
diff -up pciutils-3.5.6/lib/names.c.vafix pciutils-3.5.6/lib/names.c
|
|
|
998739 |
--- pciutils-3.5.6/lib/names.c.vafix 2018-08-21 16:32:35.268983348 +0200
|
|
|
998739 |
+++ pciutils-3.5.6/lib/names.c 2018-08-21 16:33:22.184737911 +0200
|
|
|
998739 |
@@ -148,11 +148,13 @@ pci_lookup_name(struct pci_access *a, ch
|
|
|
998739 |
case PCI_LOOKUP_VENDOR:
|
|
|
998739 |
iv = va_arg(args, int);
|
|
|
998739 |
sprintf(numbuf, "%04x", iv);
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
return format_name(buf, size, flags, id_lookup(a, flags, ID_VENDOR, iv, 0, 0, 0), numbuf, "Vendor");
|
|
|
998739 |
case PCI_LOOKUP_DEVICE:
|
|
|
998739 |
iv = va_arg(args, int);
|
|
|
998739 |
id = va_arg(args, int);
|
|
|
998739 |
sprintf(numbuf, "%04x", id);
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
return format_name(buf, size, flags, id_lookup(a, flags, ID_DEVICE, iv, id, 0, 0), numbuf, "Device");
|
|
|
998739 |
case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE:
|
|
|
998739 |
iv = va_arg(args, int);
|
|
|
998739 |
@@ -160,11 +162,13 @@ pci_lookup_name(struct pci_access *a, ch
|
|
|
998739 |
sprintf(numbuf, "%04x:%04x", iv, id);
|
|
|
998739 |
v = id_lookup(a, flags, ID_VENDOR, iv, 0, 0, 0);
|
|
|
998739 |
d = id_lookup(a, flags, ID_DEVICE, iv, id, 0, 0);
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
return format_name_pair(buf, size, flags, v, d, numbuf);
|
|
|
998739 |
case PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_VENDOR:
|
|
|
998739 |
isv = va_arg(args, int);
|
|
|
998739 |
sprintf(numbuf, "%04x", isv);
|
|
|
998739 |
v = id_lookup(a, flags, ID_VENDOR, isv, 0, 0, 0);
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
return format_name(buf, size, flags, v, numbuf, "Unknown vendor");
|
|
|
998739 |
case PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_DEVICE:
|
|
|
998739 |
iv = va_arg(args, int);
|
|
|
998739 |
@@ -172,6 +176,7 @@ pci_lookup_name(struct pci_access *a, ch
|
|
|
998739 |
isv = va_arg(args, int);
|
|
|
998739 |
isd = va_arg(args, int);
|
|
|
998739 |
sprintf(numbuf, "%04x", isd);
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
return format_name(buf, size, flags, id_lookup_subsys(a, flags, iv, id, isv, isd), numbuf, "Device");
|
|
|
998739 |
case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE | PCI_LOOKUP_SUBSYSTEM:
|
|
|
998739 |
iv = va_arg(args, int);
|
|
|
998739 |
@@ -181,6 +186,7 @@ pci_lookup_name(struct pci_access *a, ch
|
|
|
998739 |
v = id_lookup(a, flags, ID_VENDOR, isv, 0, 0, 0);
|
|
|
998739 |
d = id_lookup_subsys(a, flags, iv, id, isv, isd);
|
|
|
998739 |
sprintf(numbuf, "%04x:%04x", isv, isd);
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
return format_name_pair(buf, size, flags, v, d, numbuf);
|
|
|
998739 |
case PCI_LOOKUP_CLASS:
|
|
|
998739 |
icls = va_arg(args, int);
|
|
|
998739 |
@@ -191,6 +197,7 @@ pci_lookup_name(struct pci_access *a, ch
|
|
|
998739 |
if (!(flags & PCI_LOOKUP_NUMERIC)) /* Include full class number */
|
|
|
998739 |
flags |= PCI_LOOKUP_MIXED;
|
|
|
998739 |
}
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
return format_name(buf, size, flags, cls, numbuf, "Class");
|
|
|
998739 |
case PCI_LOOKUP_PROGIF:
|
|
|
998739 |
icls = va_arg(args, int);
|
|
|
998739 |
@@ -210,8 +217,10 @@ pci_lookup_name(struct pci_access *a, ch
|
|
|
998739 |
if (*pif)
|
|
|
998739 |
pif++;
|
|
|
998739 |
}
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
return format_name(buf, size, flags, pif, numbuf, "ProgIf");
|
|
|
998739 |
default:
|
|
|
998739 |
+ va_end(args);
|
|
|
998739 |
return "<pci_lookup_name: invalid request>";
|
|
|
998739 |
}
|
|
|
998739 |
}
|