summaryrefslogtreecommitdiff
path: root/src/dhcp-manager
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 /src/dhcp-manager
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 'src/dhcp-manager')
-rw-r--r--src/dhcp-manager/nm-dhcp-client.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c
index 3f37c08b90..59c69c2afc 100644
--- a/src/dhcp-manager/nm-dhcp-client.c
+++ b/src/dhcp-manager/nm-dhcp-client.c
@@ -238,10 +238,7 @@ timeout_cleanup (NMDhcpClient *self)
{
NMDhcpClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self);
- if (priv->timeout_id) {
- g_source_remove (priv->timeout_id);
- priv->timeout_id = 0;
- }
+ nm_clear_g_source (&priv->timeout_id);
}
static void
@@ -249,10 +246,7 @@ watch_cleanup (NMDhcpClient *self)
{
NMDhcpClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self);
- if (priv->watch_id) {
- g_source_remove (priv->watch_id);
- priv->watch_id = 0;
- }
+ nm_clear_g_source (&priv->watch_id);
}
void