From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110482 invoked by alias); 10 Jul 2015 18:00:25 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 110470 invoked by uid 89); 10 Jul 2015 18:00:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Date: Fri, 10 Jul 2015 18:00:00 -0000 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [COMMITTED PATCH] Avoid boolean coercion in tst-tls-atexit test case Message-ID: <20150710180019.GA13692@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-07/txt/msg00341.txt.bz2 Committed as obvious. --- ChangeLog | 4 ++++ stdlib/tst-tls-atexit.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4e4be6..8ee61d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-07-10 Siddhesh Poyarekar + + * stdlib/tst-tls-atexit.c (load): Avoid boolean coercion. + 2015-07-10 Torvald Riegel * nptl/sem_waitcommon.c (__new_sem_wait_slow): Update comments. diff --git a/stdlib/tst-tls-atexit.c b/stdlib/tst-tls-atexit.c index 68247d1..7a69722 100644 --- a/stdlib/tst-tls-atexit.c +++ b/stdlib/tst-tls-atexit.c @@ -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); -- 2.4.3