diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/file.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 7a36e69fbdbf..b6b4600ae8b7 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -1082,12 +1082,12 @@ SAL_CALL osl_syncFile(oslFileHandle Handle) { FileHandle_Impl* pImpl = static_cast<FileHandle_Impl*>(Handle); + if ((0 == pImpl) || ((pImpl->m_kind == FileHandle_Impl::KIND_FD) && (-1 == pImpl->m_fd))) + return osl_File_E_INVAL; + if (pImpl->m_kind == FileHandle_Impl::KIND_MEM) return osl_File_E_None; - if ((0 == pImpl) || (-1 == pImpl->m_fd)) - return osl_File_E_INVAL; - FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); OSL_TRACE("osl_syncFile(%d)", pImpl->m_fd); |