]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/proc.c
Squashed compiler warnings about code with no effect
[pciutils.git] / lib / proc.c
index 0262143a7b62a4e95561574c919b1429013788cf..f493e491e771684c0ebd0e87843d3319bf89f7cb 100644 (file)
@@ -21,7 +21,7 @@
 static void
 proc_config(struct pci_access *a)
 {
-  a->method_params[PCI_ACCESS_PROC_BUS_PCI] = PATH_PROC_BUS_PCI;
+  a->method_params[PCI_ACCESS_PROC_BUS_PCI] = PCI_PATH_PROC_BUS_PCI;
 }
 
 static int
@@ -153,10 +153,7 @@ proc_read(struct pci_dev *d, int pos, byte *buf, int len)
       return 0;
     }
   else if (res != len)
-    {
-      d->access->warning("proc_read: tried to read %d bytes at %d, but got only %d", len, pos, res);
-      return 0;
-    }
+    return 0;
   return 1;
 }
 
@@ -176,7 +173,7 @@ proc_write(struct pci_dev *d, int pos, byte *buf, int len)
     }
   else if (res != len)
     {
-      d->access->warning("proc_write: tried to write %d bytes at %d, but got only %d", len, pos, res);
+      d->access->warning("proc_write: tried to write %d bytes at %d, but only %d succeeded", len, pos, res);
       return 0;
     }
   return 1;