lib: remove duplicated assertion in bt_self_component_source_add_output_port
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 17 May 2023 19:25:41 +0000 (15:25 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sun, 21 May 2023 12:02:12 +0000 (08:02 -0400)
commit643012d55c789824e01f7d2ad5db8063d7c7fae3
tree91a2501debb7db9be81740d4690756d45c19d03c
parent1c4634037c191b6ca22faa1864a878e88c2d5d8d
lib: remove duplicated assertion in bt_self_component_source_add_output_port

The use of BT_ASSERT_PRE_OUTPUT_PORT_NAME_UNIQUE in
bt_self_component_source_add_output_port is not necessary, as
bt_component_add_output_port checks the same thing:

BT_ASSERT_PRE_FROM_FUNC(api_func, "output-port-name-is-unique",
bt_component_port_name_is_unique(component->output_ports, name),
"Output port name is not unique: name=\"%s\", %![comp-]c",
name, component);

Remove this use of BT_ASSERT_PRE_OUTPUT_PORT_NAME_UNIQUE, and then
remove BT_ASSERT_PRE_OUTPUT_PORT_NAME_UNIQUE itself.  Then, make
bt_component_port_name_is_unique static to component.c, since it's only
used in that file now.

Change-Id: Ia341be570596d798179d1937b40726f829cbebfe
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10035
Tested-by: jenkins <jenkins@lttng.org>
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/lib/graph/component-source.c
src/lib/graph/component.c
src/lib/graph/component.h
This page took 0.02667 seconds and 4 git commands to generate.