diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/nm-device.c | 4 | ||||
-rw-r--r-- | src/dhcp/nm-dhcp-helper.c | 2 | ||||
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/nm-bus-manager.c | 4 | ||||
-rw-r--r-- | src/nm-checkpoint-manager.c | 4 | ||||
-rw-r--r-- | src/nm-config.c | 2 | ||||
-rw-r--r-- | src/nm-iface-helper.c | 2 | ||||
-rw-r--r-- | src/nm-manager.c | 10 | ||||
-rw-r--r-- | src/nm-policy.c | 4 | ||||
-rw-r--r-- | src/platform/nm-platform.c | 6 | ||||
-rw-r--r-- | src/ppp/nm-pppd-plugin.c | 2 |
11 files changed, 14 insertions, 28 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index a3a7be89f5..9b492e449e 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -9331,7 +9331,7 @@ _nm_device_hash_check_invalid_keys (GHashTable *hash, const char *setting_name, gs_unref_hashtable GHashTable *check_dups = g_hash_table_new_full (nm_str_hash, g_str_equal, NULL, NULL); for (i = 0; argv[i]; i++) { - if (!nm_g_hash_table_add (check_dups, (char *) argv[i])) + if (!g_hash_table_add (check_dups, (char *) argv[i])) nm_assert (FALSE); } nm_assert (g_hash_table_size (check_dups) > 0); @@ -12344,7 +12344,7 @@ available_connections_del_all (NMDevice *self) static gboolean available_connections_add (NMDevice *self, NMConnection *connection) { - return nm_g_hash_table_add (self->_priv->available_connections, g_object_ref (connection)); + return g_hash_table_add (self->_priv->available_connections, g_object_ref (connection)); } static gboolean diff --git a/src/dhcp/nm-dhcp-helper.c b/src/dhcp/nm-dhcp-helper.c index f50c5cec02..8ea5506152 100644 --- a/src/dhcp/nm-dhcp-helper.c +++ b/src/dhcp/nm-dhcp-helper.c @@ -134,8 +134,6 @@ main (int argc, char *argv[]) guint try_count = 0; gint64 time_end; - nm_g_type_init (); - /* FIXME: g_dbus_connection_new_for_address_sync() tries to connect to the socket in * non-blocking mode, which can easily fail with EAGAIN, causing the creation of the * socket to fail with "Could not connect: Resource temporarily unavailable". diff --git a/src/main.c b/src/main.c index 6984d52dda..896e39d644 100644 --- a/src/main.c +++ b/src/main.c @@ -232,8 +232,6 @@ main (int argc, char *argv[]) NMConfigCmdLineOptions *config_cli; guint sd_id = 0; - nm_g_type_init (); - /* Known to cause a possible deadlock upon GDBus initialization: * https://bugzilla.gnome.org/show_bug.cgi?id=674885 */ g_type_ensure (G_TYPE_SOCKET); diff --git a/src/nm-bus-manager.c b/src/nm-bus-manager.c index 746d1dcbe8..3ad2131c30 100644 --- a/src/nm-bus-manager.c +++ b/src/nm-bus-manager.c @@ -835,11 +835,9 @@ nm_bus_manager_register_object (NMBusManager *self, priv = NM_BUS_MANAGER_GET_PRIVATE (self); #if NM_MORE_ASSERTS >= 1 -#if GLIB_CHECK_VERSION(2,34,0) if (g_dbus_object_manager_server_is_exported (priv->obj_manager, object)) g_return_if_reached (); #endif -#endif g_dbus_object_manager_server_export (priv->obj_manager, object); } @@ -866,11 +864,9 @@ nm_bus_manager_unregister_object (NMBusManager *self, priv = NM_BUS_MANAGER_GET_PRIVATE (self); #if NM_MORE_ASSERTS >= 1 -#if GLIB_CHECK_VERSION(2,34,0) if (!g_dbus_object_manager_server_is_exported (priv->obj_manager, object)) g_return_if_reached (); #endif -#endif g_object_get (G_OBJECT (object), "g-object-path", &path, NULL); g_return_if_fail (path != NULL); diff --git a/src/nm-checkpoint-manager.c b/src/nm-checkpoint-manager.c index 0d963ae66a..fd1d41b4b5 100644 --- a/src/nm-checkpoint-manager.c +++ b/src/nm-checkpoint-manager.c @@ -237,9 +237,7 @@ nm_checkpoint_manager_create (NMCheckpointManager *self, item->checkpoint = checkpoint; c_list_link_tail (&self->list, &item->list); - if (!nm_g_hash_table_insert (self->checkpoints, - (gpointer) checkpoint_path, - item)) + if (!g_hash_table_insert (self->checkpoints, (gpointer) checkpoint_path, item)) g_return_val_if_reached (NULL); notify_checkpoints (self); diff --git a/src/nm-config.c b/src/nm-config.c index 3b011fdd1b..118a50ca72 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -2113,7 +2113,7 @@ nm_config_device_state_load_all (void) if (!state) continue; - if (!nm_g_hash_table_insert (states, GINT_TO_POINTER (ifindex), state)) + if (!g_hash_table_insert (states, GINT_TO_POINTER (ifindex), state)) nm_assert_not_reached (); } g_dir_close (dir); diff --git a/src/nm-iface-helper.c b/src/nm-iface-helper.c index 1493ef1974..a7769ab3cd 100644 --- a/src/nm-iface-helper.c +++ b/src/nm-iface-helper.c @@ -347,8 +347,6 @@ main (int argc, char *argv[]) guint sd_id; char sysctl_path_buf[NM_UTILS_SYSCTL_IP_CONF_PATH_BUFSIZE]; - nm_g_type_init (); - setpgid (getpid (), getpid ()); if (!do_early_setup (&argc, &argv)) diff --git a/src/nm-manager.c b/src/nm-manager.c index e124c4646a..6674954f56 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -435,10 +435,10 @@ _device_route_metric_get (NMManager *self, * hence we skip it. */ continue; } - if (!nm_g_hash_table_add (priv->device_route_metrics, - _device_route_metric_data_new (device_state->ifindex, - device_state->route_metric_default_aspired, - device_state->route_metric_default_effective))) + if (!g_hash_table_add (priv->device_route_metrics, + _device_route_metric_data_new (device_state->ifindex, + device_state->route_metric_default_aspired, + device_state->route_metric_default_effective))) nm_assert_not_reached (); } } @@ -531,7 +531,7 @@ again: _LOGT (LOGD_DEVICE, "default-route-metric: ifindex %d reserves metric %u (aspired %u)", data->ifindex, data->effective_metric, data->aspired_metric); - if (!nm_g_hash_table_add (priv->device_route_metrics, data)) + if (!g_hash_table_add (priv->device_route_metrics, data)) nm_assert_not_reached (); out: diff --git a/src/nm-policy.c b/src/nm-policy.c index 9af731aaf5..3f1516a823 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1268,7 +1268,7 @@ auto_activate_device (NMPolicy *self, * activation fails in early stages without changing device * state. */ - if (nm_g_hash_table_add (priv->pending_active_connections, ac)) { + if (g_hash_table_add (priv->pending_active_connections, ac)) { g_signal_connect (ac, NM_ACTIVE_CONNECTION_STATE_CHANGED, G_CALLBACK (pending_ac_state_changed), g_object_ref (self)); g_object_weak_ref (G_OBJECT (ac), (GWeakNotify) pending_ac_gone, self); @@ -2000,7 +2000,7 @@ device_added (NMManager *manager, NMDevice *device, gpointer user_data) priv = NM_POLICY_GET_PRIVATE (self); - if (!nm_g_hash_table_add (priv->devices, device)) + if (!g_hash_table_add (priv->devices, device)) g_return_if_reached (); devices_list_register (self, device); diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index d2c0be2851..399de4a743 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -601,7 +601,7 @@ nm_platform_link_get_all (NMPlatform *self, gboolean sort_by_name) for (i = 0; i < links->len; i++) { item = NMP_OBJECT_CAST_LINK (links->pdata[i]); nm_assert (item->ifindex > 0); - if (!nm_g_hash_table_insert (unseen, GINT_TO_POINTER (item->ifindex), NULL)) + if (!g_hash_table_insert (unseen, GINT_TO_POINTER (item->ifindex), NULL)) nm_assert_not_reached (); } @@ -3338,7 +3338,7 @@ nm_platform_ip4_address_sync (NMPlatform *self, known_addresses_idx = g_hash_table_new ((GHashFunc) nmp_object_id_hash, (GEqualFunc) nmp_object_id_equal); } - if (!nm_g_hash_table_insert (known_addresses_idx, (gpointer) o, (gpointer) o)) { + if (!g_hash_table_insert (known_addresses_idx, (gpointer) o, (gpointer) o)) { /* duplicate? Keep only the first instance. */ goto delete_and_next; } @@ -3750,7 +3750,7 @@ nm_platform_ip_route_sync (NMPlatform *self, routes_idx = g_hash_table_new ((GHashFunc) nmp_object_id_hash, (GEqualFunc) nmp_object_id_equal); } - if (!nm_g_hash_table_insert (routes_idx, (gpointer) conf_o, (gpointer) conf_o)) { + if (!g_hash_table_insert (routes_idx, (gpointer) conf_o, (gpointer) conf_o)) { _LOGD ("route-sync: skip adding duplicate route %s", nmp_object_to_string (conf_o, NMP_OBJECT_TO_STRING_PUBLIC, sbuf1, sizeof (sbuf1))); continue; diff --git a/src/ppp/nm-pppd-plugin.c b/src/ppp/nm-pppd-plugin.c index c5496e6622..e3df26ef08 100644 --- a/src/ppp/nm-pppd-plugin.c +++ b/src/ppp/nm-pppd-plugin.c @@ -402,8 +402,6 @@ plugin_init (void) GDBusConnection *bus; GError *err = NULL; - nm_g_type_init (); - g_message ("nm-ppp-plugin: (%s): initializing", __func__); bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &err); |