From 90e2296ee45959d286c7520f51d163360fb7c387 Mon Sep 17 00:00:00 2001 From: Christian Eggers Date: Tue, 1 Jul 2025 16:17:38 +0200 Subject: [PATCH] advertising: client_remove: use concrete type No need for using a void pointer here. --- src/advertising.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/advertising.c b/src/advertising.c index 4476d7cd5..cc30c1c85 100644 --- a/src/advertising.c +++ b/src/advertising.c @@ -195,9 +195,8 @@ static void remove_advertising(struct btd_adv_manager *manager, manager->mgmt_index, sizeof(cp), &cp, NULL, NULL, NULL); } -static void client_remove(void *data) +static void client_remove(struct btd_adv_client *client) { - struct btd_adv_client *client = data; struct mgmt_cp_remove_advertising cp; g_dbus_client_set_proxy_handlers(client->client, NULL, NULL, NULL, @@ -225,9 +224,11 @@ static void client_remove(void *data) static void client_disconnect_cb(DBusConnection *conn, void *user_data) { + struct btd_adv_client *client = user_data; + DBG("Client disconnected"); - client_remove(user_data); + client_remove(client); } static bool parse_type(DBusMessageIter *iter, struct btd_adv_client *client) -- 2.47.3