]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - nptl/pthread_setspecific.c
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[thirdparty/glibc.git] / nptl / pthread_setspecific.c
index 152f5590e22c33f23d69b7058f56064a5a998f20..b6e66b5f22033d6fff853190f1915809770e9b64 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 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 >= PTHREAD_KEYS_MAX
-         || KEY_UNUSED ((seq = __pthread_keys[key].seq)))
+      if (KEY_UNUSED ((seq = __pthread_keys[key].seq))
+         || key >= PTHREAD_KEYS_MAX)
        /* Not valid.  */
        return EINVAL;