summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-10-06 11:51:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-10-06 11:51:19 +0200
commit78697c7956abdb610c256ba9d445a44c6d113d99 (patch)
tree9d0cadafd6dbf8b463e826b71a6abb0fbf09bf8f /sal/osl
parent9942defff713c8a3435fb4081e15615cb4afd593 (diff)
pthread_mutex_lock/unlock must not be called with null argument
...so these OSL_PRECOND should really be assert Change-Id: I61ebd16e14be81c579cd71f3cd6cd68afb95778d
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/file.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 09c50471e7cb..62cb12978c41 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -38,6 +38,7 @@
#include "uunxapi.hxx"
#include <algorithm>
+#include <cassert>
#include <limits>
#include <string.h>
@@ -217,12 +218,12 @@ void FileHandle_Impl::Allocator::deallocate (sal_uInt8 * pBuffer)
FileHandle_Impl::Guard::Guard(pthread_mutex_t * pMutex)
: m_mutex (pMutex)
{
- OSL_PRECOND (m_mutex != 0, "FileHandle_Impl::Guard::Guard(): null pointer.");
+ assert(m_mutex != 0);
(void) pthread_mutex_lock (m_mutex); // ignoring EINVAL ...
}
FileHandle_Impl::Guard::~Guard()
{
- OSL_PRECOND (m_mutex != 0, "FileHandle_Impl::Guard::~Guard(): null pointer.");
+ assert(m_mutex != 0);
(void) pthread_mutex_unlock (m_mutex);
}