mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-25 18:50:36 +01:00
settings: remove some unused code
priv->access_list is allocated during object initialization and only destroyed when the object is destroyed, so it will always be valid over the lifetime of the object. Thus no need to check if it exists or not.
This commit is contained in:
parent
c5e06c16ce
commit
4c23ac3c6c
1 changed files with 1 additions and 9 deletions
|
|
@ -210,9 +210,6 @@ update_access_list (NMSysconfigConnection *self)
|
|||
NMSessionManager *session_manager = nm_session_manager_get ();
|
||||
GSList *sessions, *iter;
|
||||
|
||||
if (!priv->access_list)
|
||||
return;
|
||||
|
||||
g_hash_table_remove_all (priv->access_list);
|
||||
sessions = nm_session_manager_get_sessions (session_manager);
|
||||
for (iter = sessions; iter != NULL; iter = iter->next) {
|
||||
|
|
@ -256,9 +253,7 @@ nm_sysconfig_connection_get_session_access_list (NMSysconfigConnection *connecti
|
|||
NMSysconfigConnectionPrivate *priv = NM_SYSCONFIG_CONNECTION_GET_PRIVATE (connection);
|
||||
GSList *sessions = NULL;
|
||||
|
||||
if (priv->access_list)
|
||||
g_hash_table_foreach (priv->access_list, prepend_slist, &sessions);
|
||||
|
||||
g_hash_table_foreach (priv->access_list, prepend_slist, &sessions);
|
||||
return sessions;
|
||||
}
|
||||
|
||||
|
|
@ -272,9 +267,6 @@ nm_sysconfig_connection_is_accessible_by_session (NMSysconfigConnection *connect
|
|||
g_return_val_if_fail (NM_IS_SYSCONFIG_CONNECTION (connection), FALSE);
|
||||
g_return_val_if_fail (NM_IS_SESSION_INFO (session), FALSE);
|
||||
|
||||
if (!priv->access_list)
|
||||
return FALSE;
|
||||
|
||||
stored_session = g_hash_table_lookup (priv->access_list,
|
||||
nm_session_info_get_id (session));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue