projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Standardize *get_*_count() functions
[babeltrace.git]
/
lib
/
graph
/
filter.c
diff --git
a/lib/graph/filter.c
b/lib/graph/filter.c
index 5931b3b3f7846c598f6fd334b7449f6ff77652be..f7d2961800e4ed5867402b0d3efa0a30900ca495 100644
(file)
--- a/
lib/graph/filter.c
+++ b/
lib/graph/filter.c
@@
-80,20
+80,20
@@
end:
return ret;
}
return ret;
}
-
enum bt_component_status
bt_component_filter_get_input_port_count(
+
int64_t
bt_component_filter_get_input_port_count(
struct bt_component *component, uint64_t *count)
{
struct bt_component *component, uint64_t *count)
{
-
enum bt_component_status status = BT_COMPONENT_STATUS_OK
;
+
int64_t ret
;
- if (!component ||
!count ||
+ if (!component ||
component->class->type != BT_COMPONENT_CLASS_TYPE_FILTER) {
component->class->type != BT_COMPONENT_CLASS_TYPE_FILTER) {
-
status = BT_COMPONENT_STATUS_INVALID
;
+
ret = -1
;
goto end;
}
goto end;
}
-
*coun
t = bt_component_get_input_port_count(component);
+
re
t = bt_component_get_input_port_count(component);
end:
end:
- return
status
;
+ return
ret
;
}
struct bt_port *bt_component_filter_get_input_port(
}
struct bt_port *bt_component_filter_get_input_port(
@@
-133,20
+133,20
@@
struct bt_port *bt_component_filter_get_default_input_port(
DEFAULT_INPUT_PORT_NAME);
}
DEFAULT_INPUT_PORT_NAME);
}
-
enum bt_component_status
bt_component_filter_get_output_port_count(
+
int64_t
bt_component_filter_get_output_port_count(
struct bt_component *component, uint64_t *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_FILTER) {
if (!component || !count ||
component->class->type != BT_COMPONENT_CLASS_TYPE_FILTER) {
-
status = BT_COMPONENT_STATUS_INVALID
;
+
ret = -1
;
goto end;
}
goto end;
}
-
*coun
t = bt_component_get_output_port_count(component);
+
re
t = bt_component_get_output_port_count(component);
end:
end:
- return
status
;
+ return
ret
;
}
struct bt_port *bt_component_filter_get_output_port(
}
struct bt_port *bt_component_filter_get_output_port(
This page took
0.024211 seconds
and
4
git commands to generate.