Standardize *get_*_count() functions
[babeltrace.git] / lib / graph / sink.c
index 49bd840249a8f8434d1295af9424345589e65719..916979adf3a9ba8670585260d7f5c32f071bb039 100644 (file)
@@ -100,20 +100,19 @@ end:
        return ret;
 }
 
-enum bt_component_status bt_component_sink_get_input_port_count(
-               struct bt_component *component, uint64_t *count)
+int64_t bt_component_sink_get_input_port_count(struct bt_component *component)
 {
-       enum bt_component_status status = BT_COMPONENT_STATUS_OK;
+       int64_t ret;
 
-       if (!component || !count ||
+       if (!component ||
                        component->class->type != BT_COMPONENT_CLASS_TYPE_SINK) {
-               status = BT_COMPONENT_STATUS_INVALID;
+               ret = -1;
                goto end;
        }
 
-       *count = bt_component_get_input_port_count(component);
+       ret = bt_component_get_input_port_count(component);
 end:
-       return status;
+       return ret;
 }
 
 struct bt_port *bt_component_sink_get_input_port(
This page took 0.026445 seconds and 4 git commands to generate.