[gnome-bluetooth/wip/hadess/small-fixes: 4/6] lib: Use g_auto in device_added callback
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/small-fixes: 4/6] lib: Use g_auto in device_added callback
- Date: Fri, 26 Nov 2021 12:49:31 +0000 (UTC)
commit d3d63dc44eb04a65eaae2827d4fc59491353e559
Author: Bastien Nocera <hadess hadess net>
Date: Wed Nov 24 17:09:30 2021 +0100
lib: Use g_auto in device_added callback
lib/bluetooth-client.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 262cb4d4..398ec16c 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -390,9 +390,9 @@ device_added (GDBusObjectManager *manager,
Device1 *device,
BluetoothClient *client)
{
- GDBusProxy *adapter;
+ g_autoptr (GDBusProxy) adapter = NULL;
const char *adapter_path, *address, *alias, *name, *icon;
- char **uuids;
+ g_auto(GStrv) uuids = NULL;
gboolean paired, trusted, connected;
int legacypairing;
BluetoothType type = BLUETOOTH_TYPE_ANY;
@@ -450,8 +450,6 @@ device_added (GDBusObjectManager *manager,
BLUETOOTH_COLUMN_PROXY, device,
-1);
}
- g_strfreev (uuids);
- g_object_unref (adapter);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]