summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-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);
}