From: Mathieu Desnoyers Date: Tue, 18 Jun 2013 14:07:57 +0000 (-0400) Subject: Tracepoint.h: replace assertion by fprintf and abort() X-Git-Tag: v2.3.0-rc1~24 X-Git-Url: http://git.lttng.org/?p=lttng-ust.git;a=commitdiff_plain;h=76aca78d0ff0670d6979a82ca688956c1d9d90a5 Tracepoint.h: replace assertion by fprintf and abort() Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 0629af23..0327c11d 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -23,12 +23,13 @@ * SOFTWARE. */ +#include +#include #include #include #include #include /* for dlopen */ #include /* for memset */ -#include #include /* for sdt */ #include @@ -289,7 +290,10 @@ __tracepoints__destroy(void) return; if (tracepoint_dlopen.liblttngust_handle && !__tracepoint_ptrs_registered) { ret = dlclose(tracepoint_dlopen.liblttngust_handle); - assert(!ret); + if (ret) { + fprintf(stderr, "Error (%d) in dlclose\n", ret); + abort(); + } memset(&tracepoint_dlopen, 0, sizeof(tracepoint_dlopen)); } } @@ -389,7 +393,10 @@ __tracepoints__ptrs_destroy(void) tracepoint_dlopen.tracepoint_unregister_lib(__start___tracepoints_ptrs); if (tracepoint_dlopen.liblttngust_handle && !__tracepoint_registered) { ret = dlclose(tracepoint_dlopen.liblttngust_handle); - assert(!ret); + if (ret) { + fprintf(stderr, "Error (%d) in dlclose\n", ret); + abort(); + } memset(&tracepoint_dlopen, 0, sizeof(tracepoint_dlopen)); } }