[gupnp: 4/4] service-proxy: Minor g_clear_pointer use




commit bac93c09a2c0f9e68d04d6bbbbe30d038454a69f
Author: Jens Georg <mail jensge org>
Date:   Sat Jul 3 19:36:57 2021 +0200

    service-proxy: Minor g_clear_pointer use

 libgupnp/gupnp-service-proxy.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 637eeae..9022344 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -278,10 +278,7 @@ gupnp_service_proxy_dispose (GObject *object)
         }
 
         /* Cancel pending notifications */
-        if (priv->notify_idle_src) {
-                g_source_destroy (priv->notify_idle_src);
-                priv->notify_idle_src = NULL;
-        }
+        g_clear_pointer (&priv->notify_idle_src, g_source_destroy);
 
         g_list_free_full (priv->pending_notifies,
                           (GDestroyNotify) emit_notify_data_free);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]