From: Philippe Proulx Date: Mon, 8 Jul 2019 19:18:25 +0000 (-0400) Subject: Fix: bt_plugin_so_shared_lib_handle_destroy(): use `#ifdef`, not `#ifndef` X-Git-Tag: v2.0.0-rc1~532 X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=d9501218b227aa39bb6890822ecc3898d870675b;p=babeltrace.git 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 --- 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);