diff options
author | Christopher Faylor <me@cgf.cx> | 2002-10-18 14:02:40 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-10-18 14:02:40 +0000 |
commit | 5d8c2b592de4ecd8c870d1112ae3ecc9a456c8bc (patch) | |
tree | a3acdf3ef30020e6630b77d1d710ad64c3dd9c4f /winsup/cygwin/thread.cc | |
parent | abb58a6d3f5af3ab5badea554280d36113fa1349 (diff) | |
download | cygnal-5d8c2b592de4ecd8c870d1112ae3ecc9a456c8bc.tar.gz cygnal-5d8c2b592de4ecd8c870d1112ae3ecc9a456c8bc.tar.bz2 cygnal-5d8c2b592de4ecd8c870d1112ae3ecc9a456c8bc.zip |
* 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.cc | 6 |
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)) |