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);
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user