summaryrefslogtreecommitdiff
path: root/src/thread/pthread_setcanceltype.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_setcanceltype.c')
-rw-r--r--src/thread/pthread_setcanceltype.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_setcanceltype.c b/src/thread/pthread_setcanceltype.c
index c73db22f..7eb543a8 100644
--- a/src/thread/pthread_setcanceltype.c
+++ b/src/thread/pthread_setcanceltype.c
@@ -3,8 +3,8 @@
int pthread_setcanceltype(int new, int *old)
{
struct pthread *self = pthread_self();
+ if (new > 1U) return EINVAL;
if (old) *old = self->cancelasync;
- if ((unsigned)new > 1) return EINVAL;
self->cancelasync = new;
return 0;
}