about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/tst-mutex1.c6
-rw-r--r--nptl/tst-mutexpi1.c1
-rw-r--r--nptl/tst-mutexpp1.c1
3 files changed, 6 insertions, 2 deletions
diff --git a/nptl/tst-mutex1.c b/nptl/tst-mutex1.c
index 2a181e587e..27ce54f33a 100644
--- a/nptl/tst-mutex1.c
+++ b/nptl/tst-mutex1.c
@@ -19,10 +19,12 @@
 #include <pthread.h>
 #include <stdio.h>
 #include <errno.h>
+#include <stdbool.h>
 
 
 #ifndef ATTR
 # define ATTR NULL
+# define ATTR_NULL true
 #endif
 
 
@@ -32,7 +34,7 @@ do_test (void)
   pthread_mutex_t m;
 
   int e = pthread_mutex_init (&m, ATTR);
-  if (ATTR != NULL && e == ENOTSUP)
+  if (!ATTR_NULL && e == ENOTSUP)
     {
       puts ("cannot support selected type of mutexes");
       return 0;
@@ -43,7 +45,7 @@ do_test (void)
       return 1;
     }
 
-  if (ATTR != NULL && pthread_mutexattr_destroy (ATTR) != 0)
+  if (!ATTR_NULL && pthread_mutexattr_destroy (ATTR) != 0)
     {
       puts ("mutexattr_destroy failed");
       return 1;
diff --git a/nptl/tst-mutexpi1.c b/nptl/tst-mutexpi1.c
index 623ede9fa5..d768664d02 100644
--- a/nptl/tst-mutexpi1.c
+++ b/nptl/tst-mutexpi1.c
@@ -24,4 +24,5 @@ prepare (void)
 
 
 #define ATTR &a
+#define ATTR_NULL false
 #include "tst-mutex1.c"
diff --git a/nptl/tst-mutexpp1.c b/nptl/tst-mutexpp1.c
index 9b7d7fe263..8ec4673f1a 100644
--- a/nptl/tst-mutexpp1.c
+++ b/nptl/tst-mutexpp1.c
@@ -42,4 +42,5 @@ do_test_wrapper (void)
 #define TEST_FUNCTION do_test_wrapper ()
 
 #define ATTR &a
+#define ATTR_NULL false
 #include "tst-mutex1.c"