From 5b5c34865c6b97850ce780f804f4e4842e58608a Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Mon, 29 Jun 2020 16:27:46 -0400 Subject: [PATCH] Cleanup: flt.lttng-utils.debug-info: remove usage of `bt_bool` inside the component class MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Also, cleanup an extra whitespace. Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau Change-Id: I7916ededcde363e6d3c7ae2eec417eedb7c1851a --- src/plugins/lttng-utils/debug-info/debug-info.c | 2 +- src/plugins/lttng-utils/debug-info/utils.c | 12 +++++------- src/plugins/lttng-utils/debug-info/utils.h | 4 +++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/lttng-utils/debug-info/debug-info.c b/src/plugins/lttng-utils/debug-info/debug-info.c index 9f564fff..aa791ddd 100644 --- a/src/plugins/lttng-utils/debug-info/debug-info.c +++ b/src/plugins/lttng-utils/debug-info/debug-info.c @@ -906,7 +906,7 @@ void handle_event_statedump(struct debug_info_msg_iter *debug_it, } else if (q_event_name == debug_info->q_statedump_build_id) { /* Build ID info */ handle_event_statedump_build_id(debug_info, event); - } else if (q_event_name == debug_info-> q_lib_unload) { + } else if (q_event_name == debug_info->q_lib_unload) { handle_event_lib_unload(debug_info, event); } diff --git a/src/plugins/lttng-utils/debug-info/utils.c b/src/plugins/lttng-utils/debug-info/utils.c index b066ea48..0042e8aa 100644 --- a/src/plugins/lttng-utils/debug-info/utils.c +++ b/src/plugins/lttng-utils/debug-info/utils.c @@ -6,6 +6,7 @@ * Babeltrace - Debug info utilities */ +#include #include #include @@ -41,19 +42,18 @@ end: } BT_HIDDEN -bt_bool is_event_common_ctx_dbg_info_compatible(const bt_field_class *in_field_class, +bool is_event_common_ctx_dbg_info_compatible(const bt_field_class *in_field_class, const char *debug_info_field_class_name) { const bt_field_class_structure_member *member; const bt_field_class *ip_fc, *vpid_fc; - bt_bool match = BT_FALSE; + bool match = false; /* * If the debug info field is already present in the event common * context. Do not try to add it. */ - member = - bt_field_class_structure_borrow_member_by_name_const( + member = bt_field_class_structure_borrow_member_by_name_const( in_field_class, debug_info_field_class_name); if (member) { goto end; @@ -73,7 +73,6 @@ bt_bool is_event_common_ctx_dbg_info_compatible(const bt_field_class *in_field_c member); if (bt_field_class_get_type(ip_fc) != BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER) { - match = BT_FALSE; goto end; } @@ -85,7 +84,6 @@ bt_bool is_event_common_ctx_dbg_info_compatible(const bt_field_class *in_field_c vpid_fc = bt_field_class_structure_member_borrow_field_class_const( member); - if (bt_field_class_get_type(vpid_fc) != BT_FIELD_CLASS_TYPE_SIGNED_INTEGER) { goto end; @@ -95,7 +93,7 @@ bt_bool is_event_common_ctx_dbg_info_compatible(const bt_field_class *in_field_c goto end; } - match = BT_TRUE; + match = true; end: return match; diff --git a/src/plugins/lttng-utils/debug-info/utils.h b/src/plugins/lttng-utils/debug-info/utils.h index 40ba38ec..c9000e9d 100644 --- a/src/plugins/lttng-utils/debug-info/utils.h +++ b/src/plugins/lttng-utils/debug-info/utils.h @@ -9,6 +9,8 @@ #ifndef BABELTRACE_PLUGIN_DEBUG_INFO_UTILS_H #define BABELTRACE_PLUGIN_DEBUG_INFO_UTILS_H +#include + #include #include "common/macros.h" @@ -21,7 +23,7 @@ BT_HIDDEN const char *get_filename_from_path(const char *path); BT_HIDDEN -bt_bool is_event_common_ctx_dbg_info_compatible( +bool is_event_common_ctx_dbg_info_compatible( const bt_field_class *in_field_class, const char *debug_info_field_class_name); -- 2.34.1