From 65214a997ed4453fc99fb39b59aaddc8f758e0b2 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 20 Jan 2013 18:54:33 -0800 Subject: [PATCH] core: Remove pointless GFunc casts from device handling --- src/device.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/device.c b/src/device.c index 53866de1c..3675616ce 100644 --- a/src/device.c +++ b/src/device.c @@ -857,9 +857,11 @@ static gboolean dev_property_get_adapter(const GDBusPropertyTable *property, return TRUE; } -static void profile_remove(struct btd_profile *profile, - struct btd_device *device) +static void profile_remove(gpointer data, gpointer user_data) { + struct btd_profile *profile = data; + struct btd_device *device = user_data; + profile->device_remove(profile, device); } @@ -885,7 +887,7 @@ int device_block(struct btd_device *device, gboolean update_only) if (device->connected) do_disconnect(device); - g_slist_foreach(device->profiles, (GFunc) profile_remove, device); + g_slist_foreach(device->profiles, profile_remove, device); g_slist_free(device->profiles); device->profiles = NULL; @@ -2171,7 +2173,7 @@ void device_remove(struct btd_device *device, gboolean remove_stored) if (remove_stored) device_remove_stored(device); - g_slist_foreach(device->profiles, (GFunc) profile_remove, device); + g_slist_foreach(device->profiles, profile_remove, device); g_slist_free(device->profiles); device->profiles = NULL; -- 2.47.3