diff options
Diffstat (limited to 'pthread')
-rw-r--r-- | pthread/pt-exit.c | 2 | ||||
-rw-r--r-- | pthread/pt-join.c | 2 | ||||
-rw-r--r-- | pthread/pt-self.c | 2 | ||||
-rw-r--r-- | pthread/pt-setcancelstate.c | 2 | ||||
-rw-r--r-- | pthread/pt-setcanceltype.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/pthread/pt-exit.c b/pthread/pt-exit.c index 314bfd4..8f3d755 100644 --- a/pthread/pt-exit.c +++ b/pthread/pt-exit.c @@ -41,7 +41,7 @@ __pthread_exit (void *status) pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); for (handlers = __pthread_get_cleanup_stack (); - *handlers; + *handlers != NULL; *handlers = (*handlers)->__next) (*handlers)->__handler ((*handlers)->__arg); diff --git a/pthread/pt-join.c b/pthread/pt-join.c index 1150b33..329163d 100644 --- a/pthread/pt-join.c +++ b/pthread/pt-join.c @@ -50,7 +50,7 @@ pthread_join (pthread_t thread, void **status) { case PTHREAD_EXITED: /* THREAD has already exited. Salvage its exit status. */ - if (status) + if (status != NULL) *status = pthread->status; __pthread_mutex_unlock (&pthread->state_lock); diff --git a/pthread/pt-self.c b/pthread/pt-self.c index 44e43dd..0f932ac 100644 --- a/pthread/pt-self.c +++ b/pthread/pt-self.c @@ -25,7 +25,7 @@ pthread_t __pthread_self (void) { struct __pthread *self = _pthread_self (); - assert (self); + assert (self != NULL); return self->thread; } diff --git a/pthread/pt-setcancelstate.c b/pthread/pt-setcancelstate.c index b015f87..de5c688 100644 --- a/pthread/pt-setcancelstate.c +++ b/pthread/pt-setcancelstate.c @@ -35,7 +35,7 @@ __pthread_setcancelstate (int state, int *oldstate) } __pthread_mutex_lock (&p->cancel_lock); - if (oldstate) + if (oldstate != NULL) *oldstate = p->cancel_state; p->cancel_state = state; __pthread_mutex_unlock (&p->cancel_lock); diff --git a/pthread/pt-setcanceltype.c b/pthread/pt-setcanceltype.c index f17a0f8..0f29a43 100644 --- a/pthread/pt-setcanceltype.c +++ b/pthread/pt-setcanceltype.c @@ -35,7 +35,7 @@ __pthread_setcanceltype (int type, int *oldtype) } __pthread_mutex_lock (&p->cancel_lock); - if (oldtype) + if (oldtype != NULL) *oldtype = p->cancel_type; p->cancel_type = type; __pthread_mutex_unlock (&p->cancel_lock); |