diff options
author | Dan Winship <danw@gnome.org> | 2014-09-08 14:18:05 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-09-17 08:21:22 -0400 |
commit | f3c02058d4a09b583471ca8a0ff96671df3938e3 (patch) | |
tree | 8f3561aba84afd69c69bde12d7bc0dba6a29028c /libnm | |
parent | a59136878ae430c18e1770faee6322cc9a1c6e5c (diff) | |
download | NetworkManager-f3c02058d4a09b583471ca8a0ff96671df3938e3.tar.gz |
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.
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/nm-object.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libnm/nm-object.c b/libnm/nm-object.c index 3784fd15b5..0f1b966b47 100644 --- a/libnm/nm-object.c +++ b/libnm/nm-object.c @@ -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); } |