[PATCH BlueZ v3 01/27] device: Fix returned error code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>

The second 'err' shadows the main local variable which is being used to
as return value of the function. Otherwise -ENOENT was always returned
in case of error.
---
 src/device.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/device.c b/src/device.c
index 5f67610..18beed9 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1060,8 +1060,6 @@ static int connect_next(struct btd_device *dev)
 	int err = -ENOENT;
 
 	while (dev->pending) {
-		int err;
-
 		profile = dev->pending->data;
 
 		err = profile->connect(dev, profile);
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux