From: Martin Mares Date: Sun, 14 Oct 2007 12:09:04 +0000 (+0200) Subject: Removed extraneous braces. X-Git-Tag: v3.0.0~8^2~19 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=9c79fcc45a0b13b5beb66834f6359e21adcfdd53;p=pciutils.git Removed extraneous braces. --- diff --git a/ChangeLog b/ChangeLog index db72832..98abcc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-10-14 Martin Mares + + * lib/[fno]bsd-*: Removed extraneous braces. + 2007-10-12 Martin Mares * Capability loop detection introduced 2.2.7 did not work diff --git a/lib/fbsd-device.c b/lib/fbsd-device.c index d6f35bd..875480d 100644 --- a/lib/fbsd-device.c +++ b/lib/fbsd-device.c @@ -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)); } diff --git a/lib/nbsd-libpci.c b/lib/nbsd-libpci.c index a79d878..81600a0 100644 --- a/lib/nbsd-libpci.c +++ b/lib/nbsd-libpci.c @@ -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; } diff --git a/lib/obsd-device.c b/lib/obsd-device.c index c24f2e3..721f2f5 100644 --- a/lib/obsd-device.c +++ b/lib/obsd-device.c @@ -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; }