From: Philippe Proulx Date: Thu, 11 May 2017 21:44:25 +0000 (-0400) Subject: port.{h,c}: use `bt_bool` instead of `int` where appropriate X-Git-Tag: v2.0.0-pre1~283 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=b65cfd0f121db4ac742adeeb9e95515df9f584d6 port.{h,c}: use `bt_bool` instead of `int` where appropriate Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/include/babeltrace/graph/port.h b/include/babeltrace/graph/port.h index 069daba1..3dd40381 100644 --- a/include/babeltrace/graph/port.h +++ b/include/babeltrace/graph/port.h @@ -55,7 +55,7 @@ extern struct bt_connection *bt_port_get_connection(struct bt_port *port); extern struct bt_component *bt_port_get_component(struct bt_port *port); extern int bt_port_remove_from_component(struct bt_port *port); extern int bt_port_disconnect(struct bt_port *port); -extern int bt_port_is_connected(struct bt_port *port); +extern bt_bool bt_port_is_connected(struct bt_port *port); static inline bt_bool bt_port_is_input(struct bt_port *port) diff --git a/lib/graph/port.c b/lib/graph/port.c index b0e95f6e..7a464708 100644 --- a/lib/graph/port.c +++ b/lib/graph/port.c @@ -26,6 +26,7 @@ * SOFTWARE. */ +#include #include #include #include @@ -174,7 +175,7 @@ end: return ret; } -int bt_port_is_connected(struct bt_port *port) +bt_bool bt_port_is_connected(struct bt_port *port) { int ret;