diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 12:24:36 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-06-27 12:24:36 +0000 |
commit | 19800cdd23a097ee58f3367f6a0d5ae535ce51d9 (patch) | |
tree | 60e852fa02d0e8cabe26d44757bb874537866d37 /sal/osl/unx/thread.c | |
parent | e39693a505dbbff6c8eb8f7d2bdaf84cd93b4559 (diff) |
INTEGRATION: CWS sb70 (1.28.120); FILE MERGED
2007/03/21 14:17:51 sb 1.28.120.1: #i75356# Cleaned up null checks.
Diffstat (limited to 'sal/osl/unx/thread.c')
-rw-r--r-- | sal/osl/unx/thread.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c index 8ce6eb9be..fd198b1e4 100644 --- a/sal/osl/unx/thread.c +++ b/sal/osl/unx/thread.c @@ -4,9 +4,9 @@ * * $RCSfile: thread.c,v $ * - * $Revision: 1.28 $ + * $Revision: 1.29 $ * - * last change: $Author: kz $ $Date: 2006-07-06 14:42:32 $ + * last change: $Author: hr $ $Date: 2007-06-27 13:24:36 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -366,13 +366,9 @@ oslThread osl_createSuspendedThread ( /*****************************************************************************/ void SAL_CALL osl_destroyThread(oslThread Thread) { - Thread_Impl* pImpl= (Thread_Impl*)Thread; - - OSL_ASSERT(pImpl); - if (!pImpl) - return; /* EINVAL */ - - osl_thread_cleanup_Impl (pImpl); + if (Thread != NULL) { + osl_thread_cleanup_Impl(Thread); + } } /*****************************************************************************/ @@ -436,9 +432,8 @@ sal_Bool SAL_CALL osl_isThreadRunning(const oslThread Thread) sal_Bool active; Thread_Impl* pImpl= (Thread_Impl*)Thread; - OSL_ASSERT(pImpl); if (!pImpl) - return sal_False; /* EINVAL */ + return sal_False; pthread_mutex_lock (&(pImpl->m_Lock)); active = ((pImpl->m_Flags & THREADIMPL_FLAGS_ACTIVE) > 0); @@ -455,9 +450,8 @@ void SAL_CALL osl_joinWithThread(oslThread Thread) int attached; Thread_Impl* pImpl= (Thread_Impl*)Thread; - OSL_ASSERT(pImpl); if (!pImpl) - return; /* EINVAL */ + return; pthread_mutex_lock (&(pImpl->m_Lock)); |