diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-26 14:37:20 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-26 16:45:19 +0100 |
commit | 9f90050aa17a76adef94b4ba2568db2da1bd1b9b (patch) | |
tree | 059ed03f013271da708107f2a3782e331ce44288 /sal | |
parent | fa42338091ecd96b637ea52984c2642b89966f44 (diff) |
loplugin:consttobool (clang-cl)
Change-Id: I81fea38cd737a8be74e6ece333ca37cc434a1c33
Reviewed-on: https://gerrit.libreoffice.org/83765
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/w32/file_dirvol.cxx | 22 | ||||
-rw-r--r-- | sal/osl/w32/procimpl.cxx | 4 | ||||
-rw-r--r-- | sal/osl/w32/security.cxx | 10 |
3 files changed, 18 insertions, 18 deletions
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx index 70e9b9ccc444..2c6ecbd34a28 100644 --- a/sal/osl/w32/file_dirvol.cxx +++ b/sal/osl/w32/file_dirvol.cxx @@ -40,7 +40,7 @@ BOOL TimeValueToFileTime(const TimeValue *cpTimeVal, FILETIME *pFTime) SYSTEMTIME BaseSysTime; FILETIME BaseFileTime; FILETIME FTime; - bool fSuccess = FALSE; + bool fSuccess = false; BaseSysTime.wYear = 1970; BaseSysTime.wMonth = 1; @@ -71,7 +71,7 @@ BOOL FileTimeToTimeValue(const FILETIME *cpFTime, TimeValue *pTimeVal) { SYSTEMTIME BaseSysTime; FILETIME BaseFileTime; - bool fSuccess = FALSE; /* Assume failure */ + bool fSuccess = false; /* Assume failure */ BaseSysTime.wYear = 1970; BaseSysTime.wMonth = 1; @@ -277,7 +277,7 @@ static HANDLE WINAPI OpenLogicalDrivesEnum() static bool WINAPI EnumLogicalDrives(HANDLE hEnum, LPWSTR lpBuffer) { - bool fSuccess = FALSE; + bool fSuccess = false; LPDRIVEENUM pEnum = static_cast<LPDRIVEENUM>(hEnum); if ( pEnum ) @@ -288,7 +288,7 @@ static bool WINAPI EnumLogicalDrives(HANDLE hEnum, LPWSTR lpBuffer) { CopyMemory( lpBuffer, pEnum->lpCurrent, (nLen + 1) * sizeof(WCHAR) ); pEnum->lpCurrent += nLen + 1; - fSuccess = TRUE; + fSuccess = true; } else SetLastError( ERROR_NO_MORE_FILES ); @@ -301,13 +301,13 @@ static bool WINAPI EnumLogicalDrives(HANDLE hEnum, LPWSTR lpBuffer) static bool WINAPI CloseLogicalDrivesEnum(HANDLE hEnum) { - bool fSuccess = FALSE; + bool fSuccess = false; LPDRIVEENUM pEnum = static_cast<LPDRIVEENUM>(hEnum); if ( pEnum ) { HeapFree( GetProcessHeap(), 0, pEnum ); - fSuccess = TRUE; + fSuccess = true; } else SetLastError( ERROR_INVALID_HANDLE ); @@ -370,7 +370,7 @@ static HANDLE WINAPI OpenDirectory( rtl_uString* pPath) static bool WINAPI EnumDirectory(HANDLE hDirectory, LPWIN32_FIND_DATAW pFindData) { - bool fSuccess = FALSE; + bool fSuccess = false; LPDIRECTORY pDirectory = static_cast<LPDIRECTORY>(hDirectory); if ( pDirectory ) @@ -382,14 +382,14 @@ static bool WINAPI EnumDirectory(HANDLE hDirectory, LPWIN32_FIND_DATAW pFindData if ( pDirectory->aFirstData.cFileName[0] ) { *pFindData = pDirectory->aFirstData; - fSuccess = TRUE; + fSuccess = true; pDirectory->aFirstData.cFileName[0] = 0; } else if ( IsValidHandle( pDirectory->hFind ) ) fSuccess = FindNextFileW( pDirectory->hFind, pFindData ); else { - fSuccess = FALSE; + fSuccess = false; SetLastError( ERROR_NO_MORE_FILES ); } @@ -405,7 +405,7 @@ static bool WINAPI EnumDirectory(HANDLE hDirectory, LPWIN32_FIND_DATAW pFindData static bool WINAPI CloseDirectory(HANDLE hDirectory) { - bool fSuccess = FALSE; + bool fSuccess = false; LPDIRECTORY pDirectory = static_cast<LPDIRECTORY>(hDirectory); if (pDirectory) @@ -1717,7 +1717,7 @@ oslFileError SAL_CALL osl_setFileAttributes( } else { - fSuccess = FALSE; + fSuccess = false; } if ( !fSuccess ) diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx index 814359647575..25b356a74d0b 100644 --- a/sal/osl/w32/procimpl.cxx +++ b/sal/osl/w32/procimpl.cxx @@ -198,7 +198,7 @@ namespace /* private */ sa.lpSecurityDescriptor = p_security_descriptor; sa.bInheritHandle = b_read_pipe_inheritable || b_write_pipe_inheritable; - bool bRet = FALSE; + bool bRet = false; HANDLE hTemp = nullptr; if (!b_read_pipe_inheritable && b_write_pipe_inheritable) @@ -520,7 +520,7 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO( OUString cmdline = command_line.makeStringAndClear(); PROCESS_INFORMATION process_info; - bool bRet = FALSE; + bool bRet = false; if ((Security != nullptr) && (static_cast<oslSecurityImpl*>(Security)->m_hToken != nullptr)) { diff --git a/sal/osl/w32/security.cxx b/sal/osl/w32/security.cxx index bd3cf3339dc7..75485820716f 100644 --- a/sal/osl/w32/security.cxx +++ b/sal/osl/w32/security.cxx @@ -536,11 +536,11 @@ static bool Privilege(LPCTSTR strPrivilege, bool bEnable) // obtain the processes token if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_DUP_QUERY, &hToken)) - return FALSE; + return false; // get the luid if (!LookupPrivilegeValue(nullptr, strPrivilege, &tp.Privileges[0].Luid)) - return FALSE; + return false; tp.PrivilegeCount = 1; @@ -551,12 +551,12 @@ static bool Privilege(LPCTSTR strPrivilege, bool bEnable) // enable or disable the privilege if (!AdjustTokenPrivileges(hToken, FALSE, &tp, 0, nullptr, nullptr)) - return FALSE; + return false; if (!CloseHandle(hToken)) - return FALSE; + return false; - return TRUE; + return true; } static bool getUserNameImpl(oslSecurity Security, rtl_uString **strName, bool bIncludeDomain) |