about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/thread/pthread_condattr_setclock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_condattr_setclock.c b/src/thread/pthread_condattr_setclock.c
index bf745523..cd2cecc9 100644
--- a/src/thread/pthread_condattr_setclock.c
+++ b/src/thread/pthread_condattr_setclock.c
@@ -2,7 +2,7 @@
 
 int pthread_condattr_setclock(pthread_condattr_t *a, clockid_t clk)
 {
-	if (clk < 0) return EINVAL;
+	if (clk < 0 || clk-2U < 2) return EINVAL;
 	*a &= 0x80000000;
 	*a |= clk;
 	return 0;