]> mj.ucw.cz Git - pciutils.git/commitdiff
Removed extraneous braces.
authorMartin Mares <mj@ucw.cz>
Sun, 14 Oct 2007 12:09:04 +0000 (14:09 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 14 Oct 2007 12:09:04 +0000 (14:09 +0200)
ChangeLog
lib/fbsd-device.c
lib/nbsd-libpci.c
lib/obsd-device.c

index db72832329e4579d94d8d53a847b4ee109e17926..98abcc3a25e20e003a6504b4927f9d043f974d5c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-14  Martin Mares <mj@ucw.cz>
+
+       * lib/[fno]bsd-*: Removed extraneous braces.
+
 2007-10-12  Martin Mares <mj@ucw.cz>
 
        * Capability loop detection introduced 2.2.7 did not work
index d6f35bdf08ba50037010f270efaa70416912b18b..875480daa332f29882d7326539e36657b8440879 100644 (file)
@@ -57,9 +57,7 @@ fbsd_init(struct pci_access *a)
 
   a->fd = open(name, O_RDWR, 0);
   if (a->fd < 0)
-    {
-      a->error("fbsd_init: %s open failed", name);
-    }
+    a->error("fbsd_init: %s open failed", name);
 }
 
 static void
@@ -74,9 +72,7 @@ fbsd_read(struct pci_dev *d, int pos, byte *buf, int len)
   struct pci_io pi;
 
   if (!(len == 1 || len == 2 || len == 4))
-    {
-      return pci_generic_block_read(d, pos, buf, len);
-    }
+    return pci_generic_block_read(d, pos, buf, len);
 
   if (pos >= 256)
     return 0;
@@ -94,9 +90,7 @@ fbsd_read(struct pci_dev *d, int pos, byte *buf, int len)
   if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0)
     {
       if (errno == ENODEV)
-        {
-          return 0;
-        }
+       return 0;
       d->access->error("fbsd_read: ioctl(PCIOCREAD) failed: %s", strerror(errno));
     }
 
@@ -121,9 +115,7 @@ fbsd_write(struct pci_dev *d, int pos, byte *buf, int len)
   struct pci_io pi;
 
   if (!(len == 1 || len == 2 || len == 4))
-    {
-      return pci_generic_block_write(d, pos, buf, len);
-    }
+    return pci_generic_block_write(d, pos, buf, len);
 
   if (pos >= 256)
     return 0;
@@ -154,9 +146,7 @@ fbsd_write(struct pci_dev *d, int pos, byte *buf, int len)
   if (ioctl(d->access->fd, PCIOCWRITE, &pi) < 0)
     {
       if (errno == ENODEV)
-        {
-          return 0;
-        }
+       return 0;
       d->access->error("fbsd_write: ioctl(PCIOCWRITE) failed: %s", strerror(errno));
     }
 
index a79d878ba4b4d98f6671eb4bb073811bb856fe9f..81600a0689051b9bcb501be2d3a6a04898653c22 100644 (file)
@@ -40,9 +40,7 @@ nbsd_detect(struct pci_access *a)
     }
 
   if (!access(name, W_OK))
-    {
-      a->writeable = O_RDWR;
-    }
+    a->writeable = O_RDWR;
   a->debug("...using %s", name);
   return 1;
 }
index c24f2e361dbdebf4582178c4b34268cfe07cccff..721f2f53c31d81193ff6b735fd41283253854043 100644 (file)
@@ -43,9 +43,7 @@ obsd_init(struct pci_access *a)
 
   a->fd = open(name, O_RDWR, 0);
   if (a->fd < 0)
-    {
-      a->error("obsd_init: %s open failed", name);
-    }
+    a->error("obsd_init: %s open failed", name);
 }
 
 static void
@@ -65,9 +63,7 @@ obsd_read(struct pci_dev *d, int pos, byte *buf, int len)
   } u;
 
   if (!(len == 1 || len == 2 || len == 4))
-    {
-      return pci_generic_block_read(d, pos, buf, len);
-    }
+    return pci_generic_block_read(d, pos, buf, len);
 
   if (pos >= 256)
     return 0;
@@ -80,11 +76,10 @@ obsd_read(struct pci_dev *d, int pos, byte *buf, int len)
   pi.pi_width = 4;
 
   if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) {
-         if (errno == ENXIO) {
+         if (errno == ENXIO)
                  pi.pi_data = 0xffffffff;
-         } else {
+         else
                  d->access->error("obsd_read: ioctl(PCIOCREAD) failed");
-         }
   }
   u.u32 = pi.pi_data;
 
@@ -109,9 +104,7 @@ obsd_write(struct pci_dev *d, int pos, byte *buf, int len)
   struct pci_io pi;
 
   if (!(len == 1 || len == 2 || len == 4))
-    {
-      return pci_generic_block_write(d, pos, buf, len);
-    }
+    return pci_generic_block_write(d, pos, buf, len);
 
   if (pos >= 256)
     return 0;
@@ -137,9 +130,7 @@ obsd_write(struct pci_dev *d, int pos, byte *buf, int len)
     }
 
   if (ioctl(d->access->fd, PCIOCWRITE, &pi) < 0)
-    {
-      d->access->error("obsd_write: ioctl(PCIOCWRITE) failed");
-    }
+    d->access->error("obsd_write: ioctl(PCIOCWRITE) failed");
 
   return 1;
 }