[PATCH 2/2] gdbus: Remove reduntant copy of GSList* from function

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

 



Local copy of the pointer to list is not required, because these
functions already has a copy, through the arguments.
---
 gdbus/object.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 8bc12f5..dafb6b5 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -399,15 +399,13 @@ static void generic_unregister(DBusConnection *connection, void *user_data)
 	g_free(data);
 }
 
-static struct interface_data *find_interface(GSList *interfaces,
+static struct interface_data *find_interface(GSList *list,
 						const char *name)
 {
-	GSList *list;
-
 	if (name == NULL)
 		return NULL;
 
-	for (list = interfaces; list; list = list->next) {
+	for (; list; list = list->next) {
 		struct interface_data *iface = list->data;
 		if (!strcmp(name, iface->name))
 			return iface;
-- 
1.7.4.1

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