From: Inga Stotland <inga.stotland@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: luiz.von.dentz@intel.com, Inga Stotland <inga.stotland@intel.com>
Subject: [PATCH BlueZ] client: Remove reference to g_steal_pointer()
Date: Mon, 9 Nov 2020 11:27:42 -0800 [thread overview]
Message-ID: <20201109192742.42207-1-inga.stotland@intel.com> (raw)
In order to avoid requiring higher version of GLib, replace
g_steal_pointer() with explicitly setting the pointer value
to NULL.
---
client/adv_monitor.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/client/adv_monitor.c b/client/adv_monitor.c
index 90ab0be09..8e81857af 100644
--- a/client/adv_monitor.c
+++ b/client/adv_monitor.c
@@ -254,10 +254,16 @@ void adv_monitor_add_manager(DBusConnection *conn, GDBusProxy *proxy)
void adv_monitor_remove_manager(DBusConnection *conn)
{
- if (manager.supported_types != NULL)
- g_slist_free(g_steal_pointer(&(manager.supported_types)));
- if (manager.supported_features != NULL)
- g_slist_free(g_steal_pointer(&(manager.supported_features)));
+ if (manager.supported_types != NULL) {
+ g_slist_free(manager.supported_types);
+ manager.supported_types = NULL;
+ }
+
+ if (manager.supported_features != NULL) {
+ g_slist_free(manager.supported_features);
+ manager.supported_features = NULL;
+ }
+
manager.proxy = NULL;
manager.app_registered = FALSE;
}
--
2.26.2
next reply other threads:[~2020-11-09 19:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 19:27 Inga Stotland [this message]
2020-11-09 19:47 ` [BlueZ] client: Remove reference to g_steal_pointer() bluez.test.bot
2020-11-09 22:27 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201109192742.42207-1-inga.stotland@intel.com \
--to=inga.stotland@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.von.dentz@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox