Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-10-18 18:02:40 +0400
committerChristopher Faylor <me@cgf.cx>2002-10-18 18:02:40 +0400
commit5d8c2b592de4ecd8c870d1112ae3ecc9a456c8bc (patch)
treea3acdf3ef30020e6630b77d1d710ad64c3dd9c4f /winsup/cygwin/thread.cc
parentabb58a6d3f5af3ab5badea554280d36113fa1349 (diff)
* thread.cc (verifyable_object_isvalid): Test for a valid object pointer before
testing for static ptr.
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index bf44faa34..42be6ca2c 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -1098,7 +1098,7 @@ pthread_mutex::isGoodInitializerOrObject (pthread_mutex_t const *mutex)
return true;
}
-bool
+bool
pthread_mutex::isGoodInitializerOrBadObject (pthread_mutex_t const *mutex)
{
verifyable_object_state objectState = verifyable_object_isvalid (mutex, PTHREAD_MUTEX_MAGIC, PTHREAD_MUTEX_INITIALIZER);
@@ -1365,10 +1365,10 @@ verifyable_object_state
verifyable_object_isvalid (void const * objectptr, long magic, void *static_ptr)
{
verifyable_object **object = (verifyable_object **)objectptr;
- if (static_ptr && *object == static_ptr)
- return VALID_STATIC_OBJECT;
if (check_valid_pointer (object))
return INVALID_OBJECT;
+ if (static_ptr && *object == static_ptr)
+ return VALID_STATIC_OBJECT;
if (!*object)
return INVALID_OBJECT;
if (check_valid_pointer (*object))