From 4f8ffa3227b4cef59e172ea4952d7c470c09d09a Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 1 May 2019 16:40:05 -0400 Subject: [PATCH] lib: bt_graph_{consume,run}(): add unlikely() to unlikely condition Signed-off-by: Philippe Proulx Change-Id: I37badc4c15fbde16940150854cae1e31305953f1 --- lib/graph/graph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/graph/graph.c b/lib/graph/graph.c index b7d04b0a..b43c35c6 100644 --- a/lib/graph/graph.c +++ b/lib/graph/graph.c @@ -688,7 +688,7 @@ enum bt_graph_status bt_graph_consume(struct bt_graph *graph) "Graph is in a faulty state: %!+g", graph); bt_graph_set_can_consume(graph, false); status = bt_graph_configure(graph); - if (status) { + if (unlikely(status)) { /* bt_graph_configure() logs errors */ goto end; } @@ -712,7 +712,7 @@ enum bt_graph_status bt_graph_run(struct bt_graph *graph) "Graph is in a faulty state: %!+g", graph); bt_graph_set_can_consume(graph, false); status = bt_graph_configure(graph); - if (status) { + if (unlikely(status)) { /* bt_graph_configure() logs errors */ goto end; } -- 2.34.1