summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-01-04 09:59:16 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2016-01-04 10:50:57 +0100
commitbb0b7cd25b067548fa93f0f0ea5e637dfbcc9bce (patch)
tree1150587a064f6fd4b5e03f4698418da7fdffdb95
parentff13d1ffac225e1693fc8e418f93006a548f793e (diff)
downloadNetworkManager-bg/helper-macros.tar.gz
core: use NM_PLATFORM_GET where possiblebg/helper-macros
Replacement was done with command: spatch --sp-file nm_platform_get.cocci --in-place --smpl-spacing --dir src where nm_platform_get.cocci contains: @@ identifier func; expression list args; @@ - func (nm_platform_get()) + func (NM_PLATFORM_GET) @@ identifier func; expression list args; @@ - func (nm_platform_get(), args) + func (NM_PLATFORM_GET, args)
-rw-r--r--src/devices/adsl/nm-device-adsl.c4
-rw-r--r--src/nm-default-route-manager.c2
-rw-r--r--src/nm-manager.c2
-rw-r--r--src/platform/tests/test-common.c6
-rw-r--r--src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c6
5 files changed, 10 insertions, 10 deletions
diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c
index f90a5c3a99..dd9a1203c1 100644
--- a/src/devices/adsl/nm-device-adsl.c
+++ b/src/devices/adsl/nm-device-adsl.c
@@ -267,7 +267,7 @@ pppoe_vcc_config (NMDeviceAdsl *self)
return FALSE;
/* Watch for the 'nas' interface going away */
- g_signal_connect (nm_platform_get (), NM_PLATFORM_SIGNAL_LINK_CHANGED,
+ g_signal_connect (NM_PLATFORM_GET, NM_PLATFORM_SIGNAL_LINK_CHANGED,
G_CALLBACK (link_changed_cb),
self);
@@ -508,7 +508,7 @@ adsl_cleanup (NMDeviceAdsl *self)
nm_exported_object_clear_and_unexport (&priv->ppp_manager);
}
- g_signal_handlers_disconnect_by_func (nm_platform_get (), G_CALLBACK (link_changed_cb), self);
+ g_signal_handlers_disconnect_by_func (NM_PLATFORM_GET, G_CALLBACK (link_changed_cb), self);
if (priv->brfd >= 0) {
close (priv->brfd);
diff --git a/src/nm-default-route-manager.c b/src/nm-default-route-manager.c
index c3b258a2f1..a27cb287a9 100644
--- a/src/nm-default-route-manager.c
+++ b/src/nm-default-route-manager.c
@@ -1389,7 +1389,7 @@ nm_default_route_manager_init (NMDefaultRouteManager *self)
priv->entries_ip4 = g_ptr_array_new_full (0, (GDestroyNotify) _entry_free);
priv->entries_ip6 = g_ptr_array_new_full (0, (GDestroyNotify) _entry_free);
- priv->platform = g_object_ref (nm_platform_get ());
+ priv->platform = g_object_ref (NM_PLATFORM_GET);
g_signal_connect (priv->platform, NM_PLATFORM_SIGNAL_IP4_ADDRESS_CHANGED, G_CALLBACK (_platform_changed_cb), self);
g_signal_connect (priv->platform, NM_PLATFORM_SIGNAL_IP6_ADDRESS_CHANGED, G_CALLBACK (_platform_changed_cb), self);
g_signal_connect (priv->platform, NM_PLATFORM_SIGNAL_IP4_ROUTE_CHANGED, G_CALLBACK (_platform_changed_cb), self);
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 97cd019808..623338a5b2 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -4330,7 +4330,7 @@ nm_manager_start (NMManager *self, GError **error)
if (!nm_settings_start (priv->settings, error))
return FALSE;
- g_signal_connect (nm_platform_get (),
+ g_signal_connect (NM_PLATFORM_GET,
NM_PLATFORM_SIGNAL_LINK_CHANGED,
G_CALLBACK (platform_link_cb),
self);
diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c
index 426b6b1674..09a57f8721 100644
--- a/src/platform/tests/test-common.c
+++ b/src/platform/tests/test-common.c
@@ -35,7 +35,7 @@ add_signal_full (const char *name, NMPlatformSignalChangeType change_type, GCall
data->name = name;
data->change_type = change_type;
data->received_count = 0;
- data->handler_id = g_signal_connect (nm_platform_get (), name, callback, data);
+ data->handler_id = g_signal_connect (NM_PLATFORM_GET, name, callback, data);
data->ifindex = ifindex;
data->ifname = ifname;
@@ -104,7 +104,7 @@ _free_signal (const char *file, int line, const char *func, SignalData *data)
if (data->received_count != 0)
g_error ("NMPlatformSignalAssert: %s:%d, %s(): failure to free non-accepted signal: "SIGNAL_DATA_FMT, file, line, func, SIGNAL_DATA_ARG (data));
- g_signal_handler_disconnect (nm_platform_get (), data->handler_id);
+ g_signal_handler_disconnect (NM_PLATFORM_GET, data->handler_id);
g_free (data);
}
@@ -1549,6 +1549,6 @@ main (int argc, char **argv)
nm_platform_link_delete (NM_PLATFORM_GET, nm_platform_link_get_ifindex (NM_PLATFORM_GET, DEVICE_NAME));
- g_object_unref (nm_platform_get ());
+ g_object_unref (NM_PLATFORM_GET);
return result;
}
diff --git a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
index 9bffaad9f3..336d9d662f 100644
--- a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
+++ b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
@@ -144,7 +144,7 @@ devtimeout_expired (gpointer user_data)
nm_log_info (LOGD_SETTINGS, "Device for connection '%s' did not appear before timeout",
nm_connection_get_id (NM_CONNECTION (self)));
- g_signal_handler_disconnect (nm_platform_get (), priv->devtimeout_link_changed_handler);
+ g_signal_handler_disconnect (NM_PLATFORM_GET, priv->devtimeout_link_changed_handler);
priv->devtimeout_link_changed_handler = 0;
priv->devtimeout_timeout_id = 0;
@@ -188,7 +188,7 @@ nm_ifcfg_connection_check_devtimeout (NMIfcfgConnection *self)
devtimeout, ifname, nm_connection_get_id (NM_CONNECTION (self)));
priv->devtimeout_link_changed_handler =
- g_signal_connect (nm_platform_get (), NM_PLATFORM_SIGNAL_LINK_CHANGED,
+ g_signal_connect (NM_PLATFORM_GET, NM_PLATFORM_SIGNAL_LINK_CHANGED,
G_CALLBACK (link_changed), self);
priv->devtimeout_timeout_id = g_timeout_add_seconds (devtimeout, devtimeout_expired, self);
}
@@ -513,7 +513,7 @@ dispose (GObject *object)
path_watch_stop (NM_IFCFG_CONNECTION (object));
- nm_clear_g_signal_handler (nm_platform_get(), &priv->devtimeout_link_changed_handler);
+ nm_clear_g_signal_handler (NM_PLATFORM_GET, &priv->devtimeout_link_changed_handler);
nm_clear_g_source (&priv->devtimeout_timeout_id);
g_clear_object (&priv->inotify_helper);