summaryrefslogtreecommitdiff
path: root/libnm/nm-object.c
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-01-04 09:46:22 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2016-01-06 21:25:55 +0100
commitfbd32869553dd631c486530a2e543c31041af5c2 (patch)
tree9e544a1e2099ecd151d5213eb81ed2e839b33462 /libnm/nm-object.c
parent205ae642f9e45ee911a688356bcba1e5b7646601 (diff)
downloadNetworkManager-fbd32869553dd631c486530a2e543c31041af5c2.tar.gz
core,libnm: use nm_clear_g_source() where possible
Replacement was done with commands: spatch --sp-file nm_clear_g_source.cocci --in-place --smpl-spacing --dir src spatch --sp-file nm_clear_g_source.cocci --in-place --smpl-spacing --dir libnm where nm_clear_g_source.cocci contains: @@ expression e; @@ - if (e) { - g_source_remove (e); - e = 0; - } + nm_clear_g_source (&e);
Diffstat (limited to 'libnm/nm-object.c')
-rw-r--r--libnm/nm-object.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libnm/nm-object.c b/libnm/nm-object.c
index 5460b83fbc..143931f1b1 100644
--- a/libnm/nm-object.c
+++ b/libnm/nm-object.c
@@ -1748,10 +1748,7 @@ dispose (GObject *object)
{
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
- if (priv->notify_id) {
- g_source_remove (priv->notify_id);
- priv->notify_id = 0;
- }
+ nm_clear_g_source (&priv->notify_id);
g_slist_free_full (priv->notify_items, (GDestroyNotify) notify_item_free);
priv->notify_items = NULL;