[grilo-plugins] freebox: Get rid of g_clear_pointer() function
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] freebox: Get rid of g_clear_pointer() function
- Date: Sun, 9 Feb 2014 22:06:42 +0000 (UTC)
commit bf2600a3513e91160eff01ef0a0769a7fae31e91
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Sun Feb 9 22:03:49 2014 +0000
freebox: Get rid of g_clear_pointer() function
Not available at glib 2.32.
src/freebox/freebox-monitor.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/freebox/freebox-monitor.c b/src/freebox/freebox-monitor.c
index a436bf4..286eb5b 100644
--- a/src/freebox/freebox-monitor.c
+++ b/src/freebox/freebox-monitor.c
@@ -107,9 +107,18 @@ freebox_monitor_finalize (GObject *object)
{
FreeboxMonitorPrivate *priv = FREEBOX_MONITOR(object)->priv;
- g_clear_pointer (&priv->browser, avahi_service_browser_free);
- g_clear_pointer (&priv->client, avahi_client_free);
- g_clear_pointer (&priv->poll, avahi_simple_poll_free);
+ if (priv->browser) {
+ avahi_service_browser_free (priv->browser);
+ priv->browser = NULL;
+ }
+ if (priv->client) {
+ avahi_client_free (priv->client);
+ priv->client = NULL;
+ }
+ if (priv->poll) {
+ avahi_glib_poll_free (priv->poll);
+ priv->poll = NULL;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]