[PATCH] Remove unneeded list when removing a device driver

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

 



---
 src/device.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/device.c b/src/device.c
index b0a6542..694a3df 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1168,7 +1168,7 @@ add_uuids:
 static void device_remove_drivers(struct btd_device *device, GSList *uuids)
 {
 	struct btd_adapter *adapter = device_get_adapter(device);
-	GSList *list, *next;
+	GSList *list;
 	char srcaddr[18], dstaddr[18];
 	bdaddr_t src;
 	sdp_list_t *records;
@@ -1181,12 +1181,10 @@ static void device_remove_drivers(struct btd_device *device, GSList *uuids)
 
 	DBG("Removing drivers for %s", dstaddr);
 
-	for (list = device->drivers; list; list = next) {
+	for (list = device->drivers; list; list = list->next) {
 		struct btd_device_driver *driver = list->data;
 		const char **uuid;
 
-		next = list->next;
-
 		for (uuid = driver->uuids; *uuid; uuid++) {
 			if (!g_slist_find_custom(uuids, *uuid,
 						(GCompareFunc) strcasecmp))
-- 
1.7.5.rc3

--
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