lib: bt_object_{get,put}_ref(): accept a `const` parameter
[babeltrace.git] / lib / plugin / plugin.c
index f70f5c315af7a5697769828372a483bca63f0df7..70e99e4f033d7fd018c25e1efa546f48e7c3c55c 100644 (file)
@@ -271,7 +271,8 @@ struct bt_plugin *bt_plugin_find(const char *plugin_name)
                                        plugin_name) == 0) {
                                BT_LOGD("Plugin found in directory: name=\"%s\", path=\"%s\"",
                                        plugin_name, dir->str);
-                               plugin = bt_object_get_ref(candidate_plugin);
+                               plugin = candidate_plugin;
+                               bt_object_get_no_null_check(plugin);
                                goto end;
                        }
                }
@@ -291,7 +292,8 @@ struct bt_plugin *bt_plugin_find(const char *plugin_name)
                                        plugin_name) == 0) {
                                BT_LOGD("Plugin found in built-in plugins: "
                                        "name=\"%s\"", plugin_name);
-                               plugin = bt_object_get_ref(candidate_plugin);
+                               plugin = candidate_plugin;
+                               bt_object_get_no_null_check(plugin);
                                goto end;
                        }
                }
This page took 0.023586 seconds and 4 git commands to generate.