Thread (7 messages) flat view 7 messages, 2 authors, 2011-05-14
STALE5560d

[PATCH] Remove unneeded list when removing a device driver

From: Claudio Takahasi <hidden>
Date: 2011-05-05 20:33:55
Subsystem: the rest · Maintainer: Linus Torvalds

---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help