[Libreoffice-commits] core.git: sal/osl
Stephan Bergmann
sbergman at redhat.com
Fri Mar 4 11:06:10 UTC 2016
sal/osl/unx/profile.cxx | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
New commits:
commit 4b47853acc33b7f372fdbf4aad311c3c943cf7fe
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Mar 4 12:05:42 2016 +0100
Clean up a SAL_WARN_IF
Change-Id: I8a945f3e83559f421aa1a0b4fbfcec1b25932ef7
diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx
index 9cbab6b..69e47330 100644
--- a/sal/osl/unx/profile.cxx
+++ b/sal/osl/unx/profile.cxx
@@ -320,19 +320,17 @@ sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile)
static bool writeProfileImpl(osl_TFile* pFile)
{
-#if OSL_DEBUG_LEVEL > 0
- unsigned int nLen=0;
-#endif
-
if ( !( pFile != nullptr && pFile->m_Handle >= 0 ) || ( pFile->m_pWriteBuf == nullptr ) )
{
return false;
}
-#if OSL_DEBUG_LEVEL > 0
- nLen=strlen(pFile->m_pWriteBuf);
- SAL_WARN_IF(nLen != (pFile->m_nWriteBufLen - pFile->m_nWriteBufFree), "sal.osl", "nLen != (pFile->m_nWriteBufLen - pFile->m_nWriteBufFree)");
-#endif
+ SAL_WARN_IF(
+ (strlen(pFile->m_pWriteBuf)
+ != pFile->m_nWriteBufLen - pFile->m_nWriteBufFree),
+ "sal.osl",
+ strlen(pFile->m_pWriteBuf) << " != "
+ << (pFile->m_nWriteBufLen - pFile->m_nWriteBufFree));
if ( !safeWrite(pFile->m_Handle, pFile->m_pWriteBuf, pFile->m_nWriteBufLen - pFile->m_nWriteBufFree) )
{
More information about the Libreoffice-commits
mailing list