From 74aa915dd3c2e65c93ed7db977f042e71d0d2123 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 3 Aug 2017 11:59:37 -0400 Subject: [PATCH] Fix: unchecked return value of bt_value_array_append_string MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit CID 1376147 (#1 of 1): Unchecked return value (CHECKED_RETURN). check_return: Calling bt_value_array_append_string without checking return value (as is done elsewhere 49 out of 50 times). Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- cli/babeltrace-cfg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/babeltrace-cfg.c b/cli/babeltrace-cfg.c index 021cca49..772cd5a5 100644 --- a/cli/babeltrace-cfg.c +++ b/cli/babeltrace-cfg.c @@ -59,7 +59,10 @@ enum bt_value_status bt_config_append_plugin_paths( for (i = 0; i < dirs->len; i++) { GString *dir = g_ptr_array_index(dirs, i); - bt_value_array_append_string(plugin_paths, dir->str); + status = bt_value_array_append_string(plugin_paths, dir->str); + if (status != BT_VALUE_STATUS_OK) { + break; + } } end: -- 2.34.1