]> Savannah Git Hosting - gnulib.git/commitdiff
thread-optim: Fix logic error.
authorBruno Haible <bruno@clisp.org>
Sun, 9 Aug 2020 09:31:48 +0000 (11:31 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Aug 2020 09:31:48 +0000 (11:31 +0200)
Reported by Paul Eggert.

* lib/thread-optim.h (IF_MT): Fix logic error.

ChangeLog
lib/thread-optim.h

index d9a78c4fc86dabb324148bd0035699b25711bcf9..ab4cc112d232cea3fce0c12ce27ffcf0aa6e079a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-09  Bruno Haible  <bruno@clisp.org>
+
+       thread-optim: Fix logic error.
+       Reported by Paul Eggert.
+       * lib/thread-optim.h (IF_MT): Fix logic error.
+
 2020-08-08  Bruno Haible  <bruno@clisp.org>
 
        localename: Use module 'thread-optim'.
index 8040d5331a4f04abf063a8abf9278071d9c1c05b..5d9a499825979db0723cdcb8490cb187c21feac0 100644 (file)
@@ -51,7 +51,7 @@
 #if HAVE_SYS_SINGLE_THREADED_H /* glibc >= 2.32 */
 # include <sys/single_threaded.h>
 # define IF_MT_DECL  char optimize_for_single_thread = __libc_single_threaded
-# define IF_MT       if (optimize_for_single_thread)
+# define IF_MT       if (!optimize_for_single_thread)
 #else
 # define IF_MT_DECL  (void *)0
 # define IF_MT