From f3c02058d4a09b583471ca8a0ff96671df3938e3 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 8 Sep 2014 14:18:05 -0400 Subject: [PATCH] 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. --- libnm/nm-object.c | 6 ++---- 1 file 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); }