Fix: bt_plugin_so_shared_lib_handle_destroy(): use `#ifdef`, not `#ifndef`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 8 Jul 2019 19:18:25 +0000 (15:18 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 8 Jul 2019 20:48:21 +0000 (16:48 -0400)
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 <eeppeliteloop@gmail.com>
Change-Id: I435bbc376323803403ee133971bcb4b7c559afe5
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1648

src/lib/plugin/plugin-so.c

index 92f47825e72ed1bc6f556b60c86f955905f1f0f6..c7b447c447a807ce33b2698dd2031b3a70d9352f 100644 (file)
@@ -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);
This page took 0.025651 seconds and 4 git commands to generate.