mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 13:00:16 +01:00
libnm: drop two unnecessary NM_IS_OBJECT() checks
Now that NMRemoteConnection is an NMObject, the code only creates NMObjects, so we don't need that check.
This commit is contained in:
parent
a59136878a
commit
f3c02058d4
1 changed files with 2 additions and 4 deletions
|
|
@ -554,8 +554,7 @@ _nm_object_create (GType type, DBusGConnection *connection, const char *path)
|
|||
object = g_object_new (type,
|
||||
NM_OBJECT_PATH, path,
|
||||
NULL);
|
||||
if (NM_IS_OBJECT (object))
|
||||
_nm_object_cache_add (NM_OBJECT (object));
|
||||
_nm_object_cache_add (NM_OBJECT (object));
|
||||
if (!g_initable_init (G_INITABLE (object), NULL, &error)) {
|
||||
dbgmsg ("Could not create object for %s: %s", path, error->message);
|
||||
g_error_free (error);
|
||||
|
|
@ -624,8 +623,7 @@ async_got_type (GType type, gpointer user_data)
|
|||
object = g_object_new (type,
|
||||
NM_OBJECT_PATH, async_data->path,
|
||||
NULL);
|
||||
if (NM_IS_OBJECT (object))
|
||||
_nm_object_cache_add (NM_OBJECT (object));
|
||||
_nm_object_cache_add (NM_OBJECT (object));
|
||||
g_async_initable_init_async (G_ASYNC_INITABLE (object), G_PRIORITY_DEFAULT,
|
||||
NULL, async_inited, async_data);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue