From 581bddc0c02dbbde4dd130bf48b0f4e1887a0abf Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 6 Jul 2020 08:01:35 -0500 Subject: 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. --- libgcompat/cxx_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgcompat') 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); } /** -- cgit v1.2.3-70-g09d2