From 7714548e2dddd3a6dbd0b8ba41a7102d64ba52f7 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Fri, 17 Oct 2014 15:54:09 +0300 Subject: [PATCH] bnep: Fix incorrect ioctl() check --- profiles/network/bnep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/network/bnep.c b/profiles/network/bnep.c index b8d2985de..18051c309 100644 --- a/profiles/network/bnep.c +++ b/profiles/network/bnep.c @@ -162,7 +162,7 @@ static int bnep_conndel(const bdaddr_t *dst) memset(&req, 0, sizeof(req)); baswap((bdaddr_t *)&req.dst, dst); req.flags = 0; - if (ioctl(ctl, BNEPCONNDEL, &req)) { + if (ioctl(ctl, BNEPCONNDEL, &req) < 0) { int err = -errno; error("bnep: Failed to kill connection: %s (%d)", strerror(-err), -err); -- 2.47.3