diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-01-04 09:46:22 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-01-06 21:25:55 +0100 |
commit | fbd32869553dd631c486530a2e543c31041af5c2 (patch) | |
tree | 9e544a1e2099ecd151d5213eb81ed2e839b33462 /libnm/nm-object.c | |
parent | 205ae642f9e45ee911a688356bcba1e5b7646601 (diff) | |
download | NetworkManager-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.c | 5 |
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; |