* thread.cc (verifyable_object_isvalid): Test for a valid object pointer before

testing for static ptr.
This commit is contained in:
Christopher Faylor 2002-10-18 14:02:40 +00:00
parent abb58a6d3f
commit 5d8c2b592d
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2002-10-18 Thomas Pfaff <tpfaff@gmx.net>
* thread.cc (verifyable_object_isvalid): Test for a valid object
pointer before testing for static ptr.
2002-10-17 Christopher Faylor <cgf@redhat.com>
* dtable.cc (dtable::init_std_file_from_handle): Force "devices" to

View File

@ -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))