Make bt_private_component_*_add_*_port() return a status code
[babeltrace.git] / plugins / text / pretty / pretty.c
index 9c994095871e556d149edf0fef49bdbe50482b00..3d4708672049e2d833a8066a6b9182ce7da00771 100644 (file)
@@ -734,22 +734,18 @@ enum bt_component_status pretty_init(
 {
        enum bt_component_status ret;
        struct pretty_component *pretty = create_pretty();
-       void *priv_port;
 
        if (!pretty) {
                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);
-
        pretty->out = stdout;
        pretty->err = stderr;
 
This page took 0.022627 seconds and 4 git commands to generate.