[Libreoffice-commits] core.git: sal/osl
Chris Sherlock
chris.sherlock79 at gmail.com
Tue Jul 11 04:25:19 UTC 2017
sal/osl/unx/file.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 4bd2e2931efbe31a5b112fec1556af17bb446163
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Wed Jul 5 12:00:51 2017 +1000
osl: unx file.cxx nullptr testing cleanup
Change-Id: Id265092c1cbf09f8c29c77c048edbf14f15070eb
Reviewed-on: https://gerrit.libreoffice.org/39515
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79 at gmail.com>
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 41584c22f7dc..f95651dab55a 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -217,13 +217,13 @@ void FileHandle_Impl::Allocator::deallocate(sal_uInt8 * pBuffer)
FileHandle_Impl::Guard::Guard(pthread_mutex_t * pMutex)
: m_mutex(pMutex)
{
- assert(m_mutex != nullptr);
- (void) pthread_mutex_lock(m_mutex); // ignoring EINVAL ...
+ assert(m_mutex);
+ (void) pthread_mutex_lock(m_mutex); // ignoring EINVAL if a null mutex is passed ...
}
FileHandle_Impl::Guard::~Guard()
{
- assert(m_mutex != nullptr);
+ assert(m_mutex);
(void) pthread_mutex_unlock(m_mutex);
}
@@ -725,7 +725,7 @@ oslFileError FileHandle_Impl::writeSequence_Impl(
*pnOffset += nBytes;
}
- return (*ppSequence != nullptr) ? osl_File_E_None : osl_File_E_NOMEM;
+ return (*ppSequence) ? osl_File_E_None : osl_File_E_NOMEM;
}
oslFileError FileHandle_Impl::syncFile()
More information about the Libreoffice-commits
mailing list