diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
index f8fcd1f..d8883d6 100644
--- a/profiles/network/bnep.c
+++ b/profiles/network/bnep.c
int bnep_init(void)
{
ctl = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_BNEP);
-
if (ctl < 0) {
int err = -errno;
warn("kernel lacks bnep-protocol support");
else
error("bnep: Failed to open control socket: %s (%d)",
- strerror(-err), -err);
+ strerror(-err), -err);
return err;
}
if (ioctl(ctl, BNEPCONNDEL, &req) < 0) {
int err = -errno;
error("bnep: Failed to kill connection: %s (%d)",
- strerror(-err), -err);
+ strerror(-err), -err);
return err;
}
return 0;
if (ioctl(ctl, BNEPCONNADD, &req) < 0) {
int err = -errno;
error("bnep: Failed to add device %s: %s(%d)",
- dev, strerror(-err), -err);
+ dev, strerror(-err), -err);
return err;
}
if (ioctl(sk, SIOCSIFFLAGS, (void *) &ifr) < 0) {
err = -errno;
error("bnep: Could not bring up %s: %s(%d)",
- devname, strerror(-err), -err);
+ devname, strerror(-err), -err);
}
close(sk);