Make bt_private_component_*_add_*_port() return a status code
[babeltrace.git] / plugins / utils / dummy / dummy.c
index 978ecdeacd6d871c7c8de0823821baa0ecf9a825..df2ddff9345408df2aca16fb676b8ef9d942a41f 100644 (file)
@@ -59,21 +59,18 @@ enum bt_component_status dummy_init(struct bt_private_component *component,
 {
        enum bt_component_status ret;
        struct dummy *dummy = g_new0(struct dummy, 1);
-       void *priv_port;
 
        if (!dummy) {
                ret = BT_COMPONENT_STATUS_NOMEM;
                goto end;
        }
 
-       priv_port = bt_private_component_sink_add_input_private_port(component,
-               "in", NULL);
-       if (!priv_port) {
-               ret = BT_COMPONENT_STATUS_NOMEM;
+       ret = bt_private_component_sink_add_input_private_port(component,
+               "in", NULL, NULL);
+       if (ret != BT_COMPONENT_STATUS_OK) {
                goto end;
        }
 
-       bt_put(priv_port);
        dummy->iterators = g_ptr_array_new_with_free_func(
                        (GDestroyNotify) bt_put);
        if (!dummy->iterators) {
@@ -106,7 +103,7 @@ void dummy_port_connected(
        connection = bt_private_port_get_private_connection(self_port);
        assert(connection);
        iterator = bt_private_connection_create_notification_iterator(
-               connection);
+               connection, NULL);
        if (!iterator) {
                dummy->error = true;
                goto end;
This page took 0.024423 seconds and 4 git commands to generate.