From 498a7979aa94b4cf8c93c5e0634a527a234a2839 Mon Sep 17 00:00:00 2001 From: bje Date: Tue, 6 Oct 1998 01:22:45 +0000 Subject: Move comment to a more obvious position. --- cancel.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'cancel.c') diff --git a/cancel.c b/cancel.c index 28d2cbc..9dd99c6 100644 --- a/cancel.c +++ b/cancel.c @@ -38,8 +38,8 @@ pthread_setcanceltype(int type, int *oldtype) pthread_t us = pthread_self(); /* Validate the new cancellation type. */ - if (type != PTHREAD_CANCEL_DEFERRED - || type != PTHREAD_CANCEL_ASYNCHRONOUS) + if (type == PTHREAD_CANCEL_ASYNCHRONOUS || + type != PTHREAD_CANCEL_DEFERRED) { return EINVAL; } @@ -69,9 +69,7 @@ pthread_cancel(pthread_t thread) void pthread_testcancel(void) { - pthread_t thread; - - thread = pthread_self(); + pthread_t thread = pthread_self(); if (thread->cancelstate == PTHREAD_CANCEL_DISABLE) { @@ -81,7 +79,6 @@ pthread_testcancel(void) if (thread->cancel_pending == TRUE) { pthread_exit(PTHREAD_CANCELED); - - /* Never reached. */ } + /* Never reached. */ } -- cgit v1.2.3