]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/i386-ports.c
lspci: Add support for CXL MLD DVSEC
[pciutils.git] / lib / i386-ports.c
index b3b752cb1f3f7181295100dc64e17bef99344b2b..2e64fe4826238d358cc7aaca682a65b3797832d7 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "internal.h"
 
-#include <unistd.h>
+#include <string.h>
 
 #if defined(PCI_OS_LINUX)
 #include "i386-io-linux.h"
@@ -50,10 +50,13 @@ conf12_init(struct pci_access *a)
 }
 
 static void
-conf12_cleanup(struct pci_access *a UNUSED)
+conf12_cleanup(struct pci_access *a)
 {
   if (conf12_io_enabled > 0)
-    conf12_io_enabled = intel_cleanup_io(a);
+    {
+      intel_cleanup_io(a);
+      conf12_io_enabled = -1;
+    }
 }
 
 /*
@@ -72,6 +75,7 @@ intel_sanity_check(struct pci_access *a, struct pci_methods *m)
 {
   struct pci_dev d;
 
+  memset(&d, 0, sizeof(d));
   a->debug("...sanity check");
   d.bus = 0;
   d.func = 0;