summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2005-12-19 05:13:45 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2005-12-19 05:13:45 +0000
commite4f8c52835283c98aeb37e3a224c13e66fd99f2a (patch)
treef4af1f6c8d5371844cac3c1f2feaa0b4329ddf51 /lib
parent693fa5b3c9455ce2ea326b863467141624b6bb30 (diff)
sanity check for key_delete was missing !
Diffstat (limited to 'lib')
-rw-r--r--lib/librthread/rthread_tls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/librthread/rthread_tls.c b/lib/librthread/rthread_tls.c
index 4adbbcb6c54..be4e8346fbc 100644
--- a/lib/librthread/rthread_tls.c
+++ b/lib/librthread/rthread_tls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread_tls.c,v 1.6 2005/12/18 01:35:06 tedu Exp $ */
+/* $OpenBSD: rthread_tls.c,v 1.7 2005/12/19 05:13:44 tedu Exp $ */
/*
* Copyright (c) 2004 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -72,7 +72,7 @@ int
pthread_key_delete(pthread_key_t key)
{
- if (rkeys[key].used)
+ if (!rkeys[key].used)
return (EINVAL);
_spinlock(&rkeyslock);