mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 11:50:18 +01:00
core: minor cleanup of handling specific-object in NMActiveConnection
- use nm_assert() for something that ~really~ always should be given. - use nm_streq0() and nm_clear_g_free().
This commit is contained in:
parent
476208d223
commit
580a11da3a
1 changed files with 3 additions and 4 deletions
|
|
@ -515,9 +515,9 @@ nm_active_connection_set_specific_object (NMActiveConnection *self,
|
|||
/* Nothing that calls this function should be using paths from D-Bus,
|
||||
* where NM uses "/" to mean NULL.
|
||||
*/
|
||||
g_assert (g_strcmp0 (specific_object, "/") != 0);
|
||||
nm_assert (!nm_streq0 (specific_object, "/"));
|
||||
|
||||
if (g_strcmp0 (priv->specific_object, specific_object) == 0)
|
||||
if (nm_streq0 (priv->specific_object, specific_object))
|
||||
return;
|
||||
|
||||
g_free (priv->specific_object);
|
||||
|
|
@ -1430,8 +1430,7 @@ dispose (GObject *object)
|
|||
|
||||
auth_cancel (self);
|
||||
|
||||
g_free (priv->specific_object);
|
||||
priv->specific_object = NULL;
|
||||
nm_clear_g_free (&priv->specific_object);
|
||||
|
||||
_set_settings_connection (self, NULL);
|
||||
g_clear_object (&priv->applied_connection);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue