Make bt_private_component_*_add_*_port() return a status code
[babeltrace.git] / plugins / ctf / fs-sink / writer.c
index a21413635de990c7ebe9e2fc4ef63da7309639e1..1bc5966deac4e4fbca37cea34d926a0078553f80 100644 (file)
@@ -290,22 +290,18 @@ enum bt_component_status writer_component_init(
        struct writer_component *writer_component = create_writer_component();
        struct bt_value *value = NULL;
        const char *path;
-       void *priv_port;
 
        if (!writer_component) {
                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);
-
        value = bt_value_map_get(params, "path");
        if (!value || bt_value_is_null(value) || !bt_value_is_string(value)) {
                fprintf(writer_component->err,
This page took 0.025304 seconds and 4 git commands to generate.