summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-07-06 08:01:35 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-07-06 08:01:35 -0500
commit581bddc0c02dbbde4dd130bf48b0f4e1887a0abf (patch)
tree750604bdaf7138f84920dba2dce4cdf5bc98dc10
parenta92382419f160f9d8cac03ad8b287e62fddc165a (diff)
downloadgcompat-581bddc0c02dbbde4dd130bf48b0f4e1887a0abf.tar.gz
gcompat-581bddc0c02dbbde4dd130bf48b0f4e1887a0abf.tar.bz2
gcompat-581bddc0c02dbbde4dd130bf48b0f4e1887a0abf.tar.xz
gcompat-581bddc0c02dbbde4dd130bf48b0f4e1887a0abf.zip
cxx_thread: Fix negated assertion
The assertion should be that the return value was 0. Additionally, show the result code if the return value is not 0.
-rw-r--r--libgcompat/cxx_thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcompat/cxx_thread.c b/libgcompat/cxx_thread.c
index 105e4c5..496a0bb 100644
--- a/libgcompat/cxx_thread.c
+++ b/libgcompat/cxx_thread.c
@@ -28,7 +28,7 @@ static void create_key(void)
{
int res = pthread_key_create(&key, run_dtors);
- GCOMPAT__assert_with_reason(res, "No key for thread_atexit list");
+ GCOMPAT__assert_with_reason(!res, "No key for thread_atexit list: %d\n", res);
}
/**