summaryrefslogtreecommitdiff
path: root/profiles/network
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2014-10-22 16:34:29 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-10-23 13:15:30 +0300
commit28f4a00f41c47ec2a211b07c47131e6284dcf466 (patch)
tree6f545f4c006412779d6af57ed91dfac9d27b7436 /profiles/network
parent6fa7b53bff47320f5d7023cdc08645f8c342a75f (diff)
downloadbluez-28f4a00f41c47ec2a211b07c47131e6284dcf466.tar.gz
bnep: trivial: code cleanup
Diffstat (limited to 'profiles/network')
-rw-r--r--profiles/network/bnep.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c
index f8fcd1f5a..d8883d68e 100644
--- a/profiles/network/bnep.c
+++ b/profiles/network/bnep.c
@@ -133,7 +133,6 @@ const char *bnep_name(uint16_t id)
int bnep_init(void)
{
ctl = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_BNEP);
-
if (ctl < 0) {
int err = -errno;
@@ -141,7 +140,7 @@ int bnep_init(void)
warn("kernel lacks bnep-protocol support");
else
error("bnep: Failed to open control socket: %s (%d)",
- strerror(-err), -err);
+ strerror(-err), -err);
return err;
}
@@ -165,7 +164,7 @@ static int bnep_conndel(const bdaddr_t *dst)
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;
@@ -184,7 +183,7 @@ static int bnep_connadd(int sk, uint16_t role, char *dev)
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;
}
@@ -208,7 +207,7 @@ static int bnep_if_up(const char *devname)
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);