diff options
author | bje <bje> | 1998-10-06 01:22:45 +0000 |
---|---|---|
committer | bje <bje> | 1998-10-06 01:22:45 +0000 |
commit | 498a7979aa94b4cf8c93c5e0634a527a234a2839 (patch) | |
tree | 7b02342ab5ee195ee33e88fdce1a75304d276ba3 | |
parent | 2363e35bd8151df977e1451f741c2fe48e64304c (diff) |
Move comment to a more obvious position.
-rw-r--r-- | cancel.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -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. */ } |