From 78697c7956abdb610c256ba9d445a44c6d113d99 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 6 Oct 2015 11:51:19 +0200 Subject: pthread_mutex_lock/unlock must not be called with null argument ...so these OSL_PRECOND should really be assert Change-Id: I61ebd16e14be81c579cd71f3cd6cd68afb95778d --- sal/osl/unx/file.cxx | 5 +++-- 1 file 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 +#include #include #include @@ -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); } -- cgit