+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
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
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;
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));
}
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;
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));
}
}
if (!access(name, W_OK))
- {
- a->writeable = O_RDWR;
- }
+ a->writeable = O_RDWR;
a->debug("...using %s", name);
return 1;
}
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
} 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;
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;
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;
}
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;
}