Standardize *get_*_count() functions
[babeltrace.git] / lib / graph / source.c
index 0c4f1817c91e7584efda10238a43d6c47c11dad6..7ab4eeae1149afc017ed0a69a01bbbd78a237130 100644 (file)
@@ -79,20 +79,20 @@ end:
        return source ? &source->parent : NULL;
 }
 
-enum bt_component_status bt_component_source_get_output_port_count(
+int64_t bt_component_source_get_output_port_count(
                struct bt_component *component, uint64_t *count)
 {
-       enum bt_component_status status = BT_COMPONENT_STATUS_OK;
+       int64_t ret;
 
        if (!component || !count ||
                        component->class->type != BT_COMPONENT_CLASS_TYPE_SOURCE) {
-               status = BT_COMPONENT_STATUS_INVALID;
+               ret = -1;
                goto end;
        }
 
-       *count = bt_component_get_output_port_count(component);
+       ret = bt_component_get_output_port_count(component);
 end:
-       return status;
+       return ret;
 }
 
 struct bt_port *bt_component_source_get_output_port(
This page took 0.023627 seconds and 4 git commands to generate.