]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - nptl/pthread_setspecific.c
2.5-18.1
[thirdparty/glibc.git] / nptl / pthread_setspecific.c
index b6e66b5f22033d6fff853190f1915809770e9b64..152f5590e22c33f23d69b7058f56064a5a998f20 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -52,8 +52,8 @@ __pthread_setspecific (key, value)
     }
   else
     {
-      if (KEY_UNUSED ((seq = __pthread_keys[key].seq))
-         || key >= PTHREAD_KEYS_MAX)
+      if (key >= PTHREAD_KEYS_MAX
+         || KEY_UNUSED ((seq = __pthread_keys[key].seq)))
        /* Not valid.  */
        return EINVAL;