[Libreoffice-commits] core.git: sal/osl

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 19 17:31:06 UTC 2019


 sal/osl/w32/thread.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fd6d48cbb8b43aa13d475873f1a5355106b2e649
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Nov 19 15:24:10 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Nov 19 18:30:09 2019 +0100

    loplugin:fakebool (clang-cl)
    
    (the use of `BOOL gotACP` in osl_getThreadTextEncoding was already safe in the
    past, converting from 16-bit HIWORD to 32-bit BOOL and then using operator!)
    
    Change-Id: Ic5019093b350b968edfcf0878126671285891502
    Reviewed-on: https://gerrit.libreoffice.org/83210
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/osl/w32/thread.cxx b/sal/osl/w32/thread.cxx
index a0f46b7e5229..b9eccf3b8bab 100644
--- a/sal/osl/w32/thread.cxx
+++ b/sal/osl/w32/thread.cxx
@@ -495,7 +495,7 @@ sal_Bool SAL_CALL osl_setThreadKeyData(oslThreadKey Key, void *pData)
     {
         PTLS    pTls = static_cast<PTLS>(Key);
         void*   pOldData = nullptr;
-        BOOL    fSuccess;
+        bool    fSuccess;
 
         if ( pTls->pfnCallback )
             pOldData = TlsGetValue( pTls->dwIndex );
@@ -505,7 +505,7 @@ sal_Bool SAL_CALL osl_setThreadKeyData(oslThreadKey Key, void *pData)
         if ( fSuccess && pTls->pfnCallback && pOldData )
             pTls->pfnCallback( pOldData );
 
-        return fSuccess != FALSE;
+        return fSuccess;
     }
 
     return false;
@@ -517,7 +517,7 @@ rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding(void)
 {
     DWORD_PTR           dwEncoding;
     rtl_TextEncoding    _encoding;
-    BOOL                gotACP;
+    bool                gotACP;
 
     if ( DWORD(-1) == g_dwTLSTextEncodingIndex )
         g_dwTLSTextEncodingIndex = TlsAlloc();


More information about the Libreoffice-commits mailing list