]> mj.ucw.cz Git - pciutils.git/blobdiff - ls-caps.c
Parameters: Keep the list sorted and remove duplicates
[pciutils.git] / ls-caps.c
index 0b6c97b3ed750d04e823d630fb3f1ec3cc5198af..a481b16b8578a9e717954be8629c07244d15e04b 100644 (file)
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -44,8 +44,8 @@ cap_pm(struct device *d, int where, int cap)
   b = get_conf_byte(d, where + PCI_PM_PPB_EXTENSIONS);
   if (b)
     printf("\t\tBridge: PM%c B3%c\n",
-          FLAG(t, PCI_PM_BPCC_ENABLE),
-          FLAG(~t, PCI_PM_PPB_B2_B3));
+          FLAG(b, PCI_PM_BPCC_ENABLE),
+          FLAG(~b, PCI_PM_PPB_B2_B3));
 }
 
 static void
@@ -1083,7 +1083,7 @@ device_has_memory_space_bar(struct device *d)
   int i, found = 0;
 
   for (i=0; i<6; i++)
-    if (p->base_addr[i] && p->size[i])
+    if (p->base_addr[i] || p->size[i])
       {
         if (!(p->base_addr[i] & PCI_BASE_ADDRESS_SPACE_IO))
           {