From 21e6ffa563a0c80b1dabc7e661a1f07771bcd35b Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 8 Jul 2019 15:18:25 -0400 Subject: [PATCH] Fix: bt_plugin_so_shared_lib_handle_destroy(): use `#ifdef`, not `#ifndef` This is a bug which comes from 3f3b176151b4163f9ae85bc583865850a18a6ce4, where `NDEBUG` was changed to `BT_DEBUG_MODE` without also inverting the preprocessor condition. Signed-off-by: Philippe Proulx Change-Id: I435bbc376323803403ee133971bcb4b7c559afe5 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1648 --- src/lib/plugin/plugin-so.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/plugin/plugin-so.c b/src/lib/plugin/plugin-so.c index 92f47825..c7b447c4 100644 --- a/src/lib/plugin/plugin-so.c +++ b/src/lib/plugin/plugin-so.c @@ -125,7 +125,7 @@ void bt_plugin_so_shared_lib_handle_destroy(struct bt_object *obj) } if (shared_lib_handle->module) { -#ifndef BT_DEBUG_MODE +#ifdef BT_DEBUG_MODE /* * Valgrind shows incomplete stack traces when * dynamically loaded libraries are closed before it @@ -149,7 +149,7 @@ void bt_plugin_so_shared_lib_handle_destroy(struct bt_object *obj) } shared_lib_handle->module = NULL; -#ifndef BT_DEBUG_MODE +#ifdef BT_DEBUG_MODE } else { BT_LOGI("Not closing GModule because `LIBBABELTRACE2_NO_DLCLOSE=1`: " "path=\"%s\"", path); -- 2.34.1