summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-10-15 23:03:11 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2012-10-15 23:03:11 +0300
commitf7fb5af2ac15ee55c4ee5384f7a0f8d1f4e939bf (patch)
tree34413e32c185c83fd9c2e3a9afcbbf4cb16f3698 /src
parent8e1c00895404d057841aa045f59c5f2f257a10f3 (diff)
adapter: Use g_slist_free_full for cleaning up discovery->found
Diffstat (limited to 'src')
-rw-r--r--src/adapter.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/adapter.c b/src/adapter.c
index 8c8b7905..86a21242 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -549,7 +549,7 @@ static void send_devices_found(struct btd_adapter *adapter)
g_dbus_send_message(conn, signal);
}
-static void invalidate_rssi(gpointer a, gpointer b)
+static void invalidate_rssi(gpointer a)
{
struct btd_device *dev = a;
@@ -570,8 +570,7 @@ static void discovery_cleanup(struct btd_adapter *adapter)
send_devices_found(adapter);
- g_slist_foreach(discovery->found, invalidate_rssi, NULL);
- g_slist_free(discovery->found);
+ g_slist_free_full(discovery->found, invalidate_rssi);
g_free(discovery);
}