Avoid boolean coercion in tst-tls-atexit test case
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 10 Jul 2015 17:50:28 +0000 (23:20 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 10 Jul 2015 17:51:32 +0000 (23:21 +0530)
ChangeLog
stdlib/tst-tls-atexit.c

index f4e4be6..8ee61d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+       * stdlib/tst-tls-atexit.c (load): Avoid boolean coercion.
+
 2015-07-10  Torvald Riegel  <triegel@redhat.com>
 
        * nptl/sem_waitcommon.c (__new_sem_wait_slow): Update comments.
index 68247d1..7a69722 100644 (file)
@@ -36,7 +36,7 @@ load (void *u)
 {
   pthread_mutex_lock (&m);
   handle = dlopen ("$ORIGIN/tst-tls-atexit-lib.so", RTLD_LAZY);
-  if (!handle)
+  if (handle == NULL)
     {
       printf ("Unable to load DSO: %s\n", dlerror ());
       return (void *) (uintptr_t) 1;
@@ -44,7 +44,7 @@ load (void *u)
 
   void (*foo) (void) = (void (*) (void)) dlsym(handle, "do_foo");
 
-  if (!foo)
+  if (foo == NULL)
     {
       printf ("Unable to find symbol: %s\n", dlerror ());
       exit (1);