diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:18:55 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:25:48 +0200 |
commit | abe81a0b7b5014aefec1ede55cc6b7b947c47484 (patch) | |
tree | 769331fe1b6fbdee41dff85b8259e5d275ab5dc2 | |
parent | b8f04b740fe3e61269daeccbbb9bc5752e5fd5b3 (diff) |
loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I6c656f991999791469015500aff1905fdb16ba65
-rw-r--r-- | sal/osl/all/signalshared.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/conditn.cxx | 14 | ||||
-rw-r--r-- | sal/osl/unx/file_stat.cxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/module.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/mutex.cxx | 12 | ||||
-rw-r--r-- | sal/osl/unx/profile.cxx | 44 | ||||
-rw-r--r-- | sal/osl/unx/security.cxx | 8 | ||||
-rw-r--r-- | sal/osl/unx/socket.cxx | 58 | ||||
-rw-r--r-- | sal/osl/unx/thread.cxx | 8 | ||||
-rw-r--r-- | sal/osl/unx/time.cxx | 22 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 8 | ||||
-rw-r--r-- | sal/qa/osl/module/osl_Module_DLL.cxx | 2 | ||||
-rw-r--r-- | sal/qa/rtl/uuid/rtl_Uuid.cxx | 2 | ||||
-rw-r--r-- | sal/rtl/byteseq.cxx | 4 | ||||
-rw-r--r-- | sal/rtl/locale.cxx | 10 | ||||
-rw-r--r-- | sal/rtl/string.cxx | 4 | ||||
-rw-r--r-- | sal/rtl/strtmpl.cxx | 6 | ||||
-rw-r--r-- | sal/rtl/ustring.cxx | 8 |
18 files changed, 111 insertions, 111 deletions
diff --git a/sal/osl/all/signalshared.cxx b/sal/osl/all/signalshared.cxx index d4615b3a153e..341d7dce05d9 100644 --- a/sal/osl/all/signalshared.cxx +++ b/sal/osl/all/signalshared.cxx @@ -125,7 +125,7 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler handler) free(pHandler); - return sal_True; + return true; } pPrevious = pHandler; @@ -134,7 +134,7 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler handler) osl_releaseMutex(SignalListMutex); - return sal_False; + return false; } oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 userSignal, void* userData) diff --git a/sal/osl/unx/conditn.cxx b/sal/osl/unx/conditn.cxx index cde2c152a97b..ba86f937018f 100644 --- a/sal/osl/unx/conditn.cxx +++ b/sal/osl/unx/conditn.cxx @@ -109,7 +109,7 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition) if ( nRet != 0 ) { SAL_WARN( "sal.osl.condition", "osl_setCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) ); - return sal_False; + return false; } pCond->m_State = true; @@ -119,19 +119,19 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition) SAL_WARN( "sal.osl.condition", "osl_setCondition(" << pCond << "): pthread_cond_broadcast failed: " << strerror(nRet) ); // try to unlock the mutex pthread_mutex_unlock(&pCond->m_Lock); - return sal_False; + return false; } nRet = pthread_mutex_unlock(&pCond->m_Lock); if ( nRet != 0 ) { SAL_WARN( "sal.osl.condition", "osl_setCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) ); - return sal_False; + return false; } SAL_INFO( "sal.osl.condition", "osl_setCondition(" << pCond << ")" ); - return sal_True; + return true; } @@ -148,7 +148,7 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition) if ( nRet != 0 ) { SAL_WARN( "sal.osl.condition", "osl_resetCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) ); - return sal_False; + return false; } pCond->m_State = false; @@ -157,12 +157,12 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition) if ( nRet != 0 ) { SAL_WARN( "sal.osl.condition", "osl_resetCondition(" << pCond << "): pthread_mutex_unlock failed: " << strerror(nRet) ); - return sal_False; + return false; } SAL_INFO( "sal.osl.condition", "osl_resetCondition(" << pCond << ")" ); - return sal_True; + return true; } oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const TimeValue* pTimeout) diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index 5fdd663eac93..d54de62f9e73 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -425,16 +425,16 @@ SAL_CALL osl_identicalDirectoryItem( oslDirectoryItem a, oslDirectoryItem b) DirectoryItem_Impl *pA = static_cast<DirectoryItem_Impl *>(a); DirectoryItem_Impl *pB = static_cast<DirectoryItem_Impl *>(b); if (a == b) - return sal_True; + return true; /* same name => same item, unless renaming / moving madness has occurred */ if (pA->m_ustrFilePath == pB->m_ustrFilePath) - return sal_True; + return true; struct stat a_stat, b_stat; if (osl::lstat(rtl::OUString(pA->m_ustrFilePath), a_stat) != 0 || osl::lstat(rtl::OUString(pB->m_ustrFilePath), b_stat) != 0) - return sal_False; + return false; return (a_stat.st_ino == b_stat.st_ino); } diff --git a/sal/osl/unx/module.cxx b/sal/osl/unx/module.cxx index 71a7c0dace3d..f18192904cd8 100644 --- a/sal/osl/unx/module.cxx +++ b/sal/osl/unx/module.cxx @@ -210,7 +210,7 @@ osl_getModuleHandle(rtl_uString *, oslModule *pResult) #else *pResult = nullptr; #endif - return sal_True; + return true; } #ifndef DISABLE_DYNLOADING diff --git a/sal/osl/unx/mutex.cxx b/sal/osl/unx/mutex.cxx index b37e36b3df24..1e262dd63be8 100644 --- a/sal/osl/unx/mutex.cxx +++ b/sal/osl/unx/mutex.cxx @@ -100,13 +100,13 @@ sal_Bool SAL_CALL osl_acquireMutex(oslMutexImpl *pMutex) if ( nRet != 0 ) { SAL_WARN("sal.osl.mutex", "pthread_mutex_lock failed: " << strerror(nRet)); - return sal_False; + return false; } - return sal_True; + return true; } /* not initialized */ - return sal_False; + return false; } sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutexImpl *pMutex) @@ -137,14 +137,14 @@ sal_Bool SAL_CALL osl_releaseMutex(oslMutexImpl *pMutex) if ( nRet != 0 ) { SAL_WARN("sal.osl.mutex", "pthread_mutex_unlock failed: " << strerror(nRet)); - return sal_False; + return false; } - return sal_True; + return true; } /* not initialized */ - return sal_False; + return false; } static oslMutexImpl globalMutexImpl; diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index af8ebce3e25b..b62bfad8adda 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -191,7 +191,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile) if ( Profile == nullptr ) { - return sal_False; + return false; } pthread_mutex_lock(&(pProfile->m_AccessLock)); @@ -201,7 +201,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile) SAL_WARN("sal.osl", "!pProfile->m_bIsValid"); pthread_mutex_unlock(&(pProfile->m_AccessLock)); - return sal_False; + return false; } pProfile->m_bIsValid = false; @@ -227,7 +227,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile) pthread_mutex_unlock(&(pProfile->m_AccessLock)); SAL_INFO("sal.osl", "Out osl_closeProfile [pProfile==0]"); - return sal_False; + return false; } pProfile = pTmpProfile; @@ -277,7 +277,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile) free(pProfile); - return sal_True; + return true; } sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile) @@ -288,7 +288,7 @@ sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile) if ( pProfile == nullptr ) { - return sal_False; + return false; } pthread_mutex_lock(&(pProfile->m_AccessLock)); @@ -297,7 +297,7 @@ sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile) { SAL_WARN_IF(!pProfile->m_bIsValid, "sal.osl", "!pProfile->m_bIsValid"); pthread_mutex_unlock(&(pProfile->m_AccessLock)); - return sal_False; + return false; } pFile = pProfile->m_pFile; @@ -305,7 +305,7 @@ sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile) { pthread_mutex_unlock(&(pProfile->m_AccessLock)); - return sal_False; + return false; } if ( pProfile->m_Flags & FLG_MODIFIED ) @@ -363,7 +363,7 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, if ( pTmpProfile == nullptr ) { - return sal_False; + return false; } pthread_mutex_lock(&(pTmpProfile->m_AccessLock)); @@ -372,7 +372,7 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return sal_False; + return false; } pProfile = acquireProfile(Profile, false); @@ -381,7 +381,7 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return sal_False; + return false; } if (! (pProfile->m_Flags & osl_Profile_SYSTEM)) @@ -419,12 +419,12 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return sal_False; + return false; } pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return sal_True; + return true; } sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile, @@ -440,12 +440,12 @@ sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile, if ((strcasecmp(Line, STR_INI_BOOLYES) == 0) || (strcasecmp(Line, STR_INI_BOOLON) == 0) || (strcasecmp(Line, STR_INI_BOOLONE) == 0)) - Default = sal_True; + Default = true; else if ((strcasecmp(Line, STR_INI_BOOLNO) == 0) || (strcasecmp(Line, STR_INI_BOOLOFF) == 0) || (strcasecmp(Line, STR_INI_BOOLZERO) == 0)) - Default = sal_False; + Default = false; } return Default; @@ -497,7 +497,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, if ( pTmpProfile == nullptr ) { - return sal_False; + return false; } pthread_mutex_lock(&(pTmpProfile->m_AccessLock)); @@ -507,7 +507,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, SAL_WARN_IF(!pTmpProfile->m_bIsValid, "sal.osl", "!pTmpProfile->m_bIsValid"); pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return sal_False; + return false; } pProfile=acquireProfile(Profile, true); @@ -516,7 +516,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return sal_False; + return false; } Line = static_cast<sal_Char*>(malloc(strlen(pszEntry)+strlen(pszString)+48)); @@ -542,7 +542,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); free(Line); - return sal_False; + return false; } pSec = &pProfile->m_Sections[pProfile->m_NoSections - 1]; @@ -570,7 +570,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); free(Line); - return sal_False; + return false; } pProfile->m_Flags |= FLG_MODIFIED; @@ -650,7 +650,7 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile, if ( pTmpProfile == nullptr ) { - return sal_False; + return false; } pthread_mutex_lock(&(pTmpProfile->m_AccessLock)); @@ -659,7 +659,7 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile, { SAL_WARN_IF(!pTmpProfile->m_bIsValid, "sal.osl", "!pTmpProfile->m_bIsValid"); pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return sal_False; + return false; } pProfile = acquireProfile(Profile, true); @@ -668,7 +668,7 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return sal_False; + return false; } if (! (pProfile->m_Flags & osl_Profile_SYSTEM)) diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx index c4d9d29fa405..e4ff675a6bc2 100644 --- a/sal/osl/unx/security.cxx +++ b/sal/osl/unx/security.cxx @@ -503,12 +503,12 @@ sal_Bool SAL_CALL osl_isAdministrator(oslSecurity Security) oslSecurityImpl *pSecImpl = static_cast<oslSecurityImpl *>(Security); if (pSecImpl == nullptr) - return sal_False; + return false; if (pSecImpl->m_pPasswd.pw_uid != 0) - return sal_False; + return false; - return sal_True; + return true; } void SAL_CALL osl_freeSecurityHandle(oslSecurity Security) @@ -519,7 +519,7 @@ void SAL_CALL osl_freeSecurityHandle(oslSecurity Security) sal_Bool SAL_CALL osl_loadUserProfile(oslSecurity Security) { (void) Security; /* unused */ - return sal_False; + return false; } void SAL_CALL osl_unloadUserProfile(oslSecurity Security) diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index 77ff58c6a2d1..49b8a250866c 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -538,7 +538,7 @@ sal_Bool SAL_CALL osl_isEqualSocketAddr ( if (pAddr1 == pAddr2) { - return sal_True; + return true; } if (pAddr1->sa_family == pAddr2->sa_family) @@ -553,7 +553,7 @@ sal_Bool SAL_CALL osl_isEqualSocketAddr ( if ((pInetAddr1->sin_family == pInetAddr2->sin_family) && (pInetAddr1->sin_addr.s_addr == pInetAddr2->sin_addr.s_addr) && (pInetAddr1->sin_port == pInetAddr2->sin_port)) - return sal_True; + return true; } default: @@ -563,7 +563,7 @@ sal_Bool SAL_CALL osl_isEqualSocketAddr ( } } - return sal_False; + return false; } oslSocketAddr SAL_CALL osl_createInetBroadcastAddr ( @@ -1210,12 +1210,12 @@ sal_Bool SAL_CALL osl_setInetPortOfSocketAddr(oslSocketAddr pAddr, sal_Int32 Por if ( pSystemInetAddr->sin_family == FAMILY_TO_NATIVE(osl_Socket_FamilyInet)) { pSystemInetAddr->sin_port= htons((short)Port); - return sal_True; + return true; } } /* this is not a inet-addr => can't set port */ - return sal_False; + return false; } oslSocketResult SAL_CALL osl_getHostnameOfSocketAddr(oslSocketAddr Addr, rtl_uString **ustrHostname) @@ -1485,7 +1485,7 @@ sal_Bool SAL_CALL osl_bindAddrToSocket(oslSocket pSocket, SAL_WARN_IF( !pAddr, "sal.osl", "undefined address" ); if ( pSocket == nullptr || pAddr == nullptr ) { - return sal_False; + return false; } pSocket->m_nLastError=0; @@ -1495,10 +1495,10 @@ sal_Bool SAL_CALL osl_bindAddrToSocket(oslSocket pSocket, if ( nRet == OSL_SOCKET_ERROR) { pSocket->m_nLastError=errno; - return sal_False; + return false; } - return sal_True; + return true; } sal_Bool SAL_CALL osl_listenOnSocket(oslSocket pSocket, @@ -1509,7 +1509,7 @@ sal_Bool SAL_CALL osl_listenOnSocket(oslSocket pSocket, SAL_WARN_IF( !pSocket, "sal.osl", "undefined socket" ); if ( pSocket == nullptr ) { - return sal_False; + return false; } pSocket->m_nLastError=0; @@ -1521,10 +1521,10 @@ sal_Bool SAL_CALL osl_listenOnSocket(oslSocket pSocket, if ( nRet == OSL_SOCKET_ERROR) { pSocket->m_nLastError=errno; - return sal_False; + return false; } - return sal_True; + return true; } oslSocketResult SAL_CALL osl_connectSocketTo(oslSocket pSocket, @@ -1566,7 +1566,7 @@ oslSocketResult SAL_CALL osl_connectSocketTo(oslSocket pSocket, } /* set socket temporarily to non-blocking */ - if( !osl_enableNonBlockingMode(pSocket, sal_True) ) + if( !osl_enableNonBlockingMode(pSocket, true) ) SAL_WARN( "sal.osl", "failed to enable non-blocking mode" ); /* initiate connect */ @@ -1575,7 +1575,7 @@ oslSocketResult SAL_CALL osl_connectSocketTo(oslSocket pSocket, sizeof(struct sockaddr)) != OSL_SOCKET_ERROR) { /* immediate connection */ - osl_enableNonBlockingMode(pSocket, sal_False); + osl_enableNonBlockingMode(pSocket, false); return osl_Socket_Ok; } @@ -1588,7 +1588,7 @@ oslSocketResult SAL_CALL osl_connectSocketTo(oslSocket pSocket, int nErrno = errno; SAL_WARN( "sal.osl", "connection failed: (" << nErrno << ") " << strerror(nErrno) ); - osl_enableNonBlockingMode(pSocket, sal_False); + osl_enableNonBlockingMode(pSocket, false); return osl_Socket_Error; } } @@ -1655,7 +1655,7 @@ oslSocketResult SAL_CALL osl_connectSocketTo(oslSocket pSocket, Result= osl_Socket_TimedOut; } - osl_enableNonBlockingMode(pSocket, sal_False); + osl_enableNonBlockingMode(pSocket, false); return Result; } @@ -2079,7 +2079,7 @@ sal_Bool SAL_CALL osl_isReceiveReady ( if (pSocket == nullptr) { /* ENOTSOCK */ - return sal_False; + return false; } return socket_poll (pSocket, pTimeout, POLLIN); @@ -2092,7 +2092,7 @@ sal_Bool SAL_CALL osl_isSendReady ( if (pSocket == nullptr) { /* ENOTSOCK */ - return sal_False; + return false; } return socket_poll (pSocket, pTimeout, POLLOUT); @@ -2105,7 +2105,7 @@ sal_Bool SAL_CALL osl_isExceptionPending ( if (pSocket == nullptr) { /* ENOTSOCK */ - return sal_False; + return false; } return socket_poll (pSocket, pTimeout, POLLPRI); @@ -2119,7 +2119,7 @@ sal_Bool SAL_CALL osl_shutdownSocket(oslSocket pSocket, SAL_WARN_IF( !pSocket, "sal.osl", "undefined socket" ); if ( pSocket == nullptr ) { - return sal_False; + return false; } pSocket->m_nLastError=0; @@ -2174,7 +2174,7 @@ sal_Bool SAL_CALL osl_setSocketOption(oslSocket pSocket, SAL_WARN_IF( !pSocket, "sal.osl", "undefined socket" ); if ( pSocket == nullptr ) { - return sal_False; + return false; } pSocket->m_nLastError=0; @@ -2188,10 +2188,10 @@ sal_Bool SAL_CALL osl_setSocketOption(oslSocket pSocket, if ( nRet < 0 ) { pSocket->m_nLastError=errno; - return sal_False; + return false; } - return sal_True; + return true; } sal_Bool SAL_CALL osl_enableNonBlockingMode(oslSocket pSocket, @@ -2203,7 +2203,7 @@ sal_Bool SAL_CALL osl_enableNonBlockingMode(oslSocket pSocket, SAL_WARN_IF( !pSocket, "sal.osl", "undefined socket" ); if ( pSocket == nullptr ) { - return sal_False; + return false; } pSocket->m_nLastError=0; @@ -2220,10 +2220,10 @@ sal_Bool SAL_CALL osl_enableNonBlockingMode(oslSocket pSocket, if ( nRet < 0 ) { pSocket->m_nLastError=errno; - return sal_False; + return false; } - return sal_True; + return true; } sal_Bool SAL_CALL osl_isNonBlockingMode(oslSocket pSocket) @@ -2233,7 +2233,7 @@ sal_Bool SAL_CALL osl_isNonBlockingMode(oslSocket pSocket) SAL_WARN_IF( !pSocket, "sal.osl", "undefined socket" ); if ( pSocket == nullptr ) { - return sal_False; + return false; } pSocket->m_nLastError=0; @@ -2241,9 +2241,9 @@ sal_Bool SAL_CALL osl_isNonBlockingMode(oslSocket pSocket) flags = fcntl(pSocket->m_Socket, F_GETFL, 0); if (flags == -1 || !(flags & O_NONBLOCK)) - return sal_False; + return false; else - return sal_True; + return true; } oslSocketType SAL_CALL osl_getSocketType(oslSocket pSocket) @@ -2403,7 +2403,7 @@ sal_Bool SAL_CALL osl_isInSocketSet(oslSocketSet Set, oslSocket pSocket) SAL_WARN_IF( !pSocket, "sal.osl", "undefined socket" ); if ( Set == nullptr || pSocket == nullptr ) { - return sal_False; + return false; } return bool(FD_ISSET(pSocket->m_Socket, &Set->m_Set)); diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx index e9446dfe31c4..10561fbe0592 100644 --- a/sal/osl/unx/thread.cxx +++ b/sal/osl/unx/thread.cxx @@ -416,7 +416,7 @@ sal_Bool SAL_CALL osl_isThreadRunning(const oslThread Thread) Thread_Impl* pImpl= static_cast<Thread_Impl*>(Thread); if (!pImpl) - return sal_False; + return false; pthread_mutex_lock (&(pImpl->m_Lock)); active = ((pImpl->m_Flags & THREADIMPL_FLAGS_ACTIVE) > 0); @@ -490,13 +490,13 @@ sal_Bool SAL_CALL osl_scheduleThread(oslThread Thread) if (!pImpl) { SAL_WARN("sal.osl", "invalid osl_scheduleThread(nullptr) call"); - return sal_False; /* EINVAL */ + return false; /* EINVAL */ } if (!(pthread_equal (pthread_self(), pImpl->m_hThread))) { SAL_WARN("sal.osl", "invalid osl_scheduleThread(non-self) call"); - return sal_False; /* EINVAL */ + return false; /* EINVAL */ } pthread_mutex_lock (&(pImpl->m_Lock)); @@ -981,7 +981,7 @@ sal_Bool SAL_CALL osl_setThreadKeyData(oslThreadKey Key, void *pData) void *pOldData = nullptr; wrapper_pthread_key *pKey = static_cast<wrapper_pthread_key*>(Key); if (!pKey) - return sal_False; + return false; if (pKey->pfnCallback) pOldData = pthread_getspecific(pKey->m_key); diff --git a/sal/osl/unx/time.cxx b/sal/osl/unx/time.cxx index 9c2332d91069..624f820b573c 100644 --- a/sal/osl/unx/time.cxx +++ b/sal/osl/unx/time.cxx @@ -76,7 +76,7 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* tv) if (res != 0) { - return sal_False; + return false; } tv->Seconds = tp.tv_sec; @@ -86,7 +86,7 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* tv) tv->Nanosec = tp.tv_usec * 1000; #endif #endif - return sal_True; + return true; } sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( const TimeValue* pTimeVal, oslDateTime* pDateTime ) @@ -112,10 +112,10 @@ sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( const TimeValue* pTimeVal, oslDa pDateTime->Month = pSystemTime->tm_mon + 1; pDateTime->Year = pSystemTime->tm_year + 1900; - return sal_True; + return true; } - return sal_False; + return false; } sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, TimeValue* pTimeVal ) @@ -133,7 +133,7 @@ sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, Ti if ( pDateTime->Month > 0 ) aTime.tm_mon = pDateTime->Month - 1; else - return sal_False; + return false; aTime.tm_year = pDateTime->Year - 1900; @@ -178,10 +178,10 @@ sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, Ti if ( nSeconds > bias ) pTimeVal->Seconds -= bias; - return sal_True; + return true; } - return sal_False; + return false; } sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( const TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal ) @@ -211,10 +211,10 @@ sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( const TimeValue* pSystemTimeVa pLocalTimeVal->Seconds = pSystemTimeVal->Seconds - bias; pLocalTimeVal->Nanosec = pSystemTimeVal->Nanosec; - return sal_True; + return true; } - return sal_False; + return false; } sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( const TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal ) @@ -253,10 +253,10 @@ sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( const TimeValue* pLocalTimeVal pSystemTimeVal->Seconds = pLocalTimeVal->Seconds + bias; pSystemTimeVal->Nanosec = pLocalTimeVal->Nanosec; - return sal_True; + return true; } - return sal_False; + return false; } void sal_initGlobalTimer() diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 1efaf0444f28..26501d9a2c6d 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -2578,7 +2578,7 @@ namespace osl_File void isEndOfFile_001() { ::osl::File testFile( aTmpName4 ); - sal_Bool bEOF = sal_False; + sal_Bool bEOF = false; sal_Bool *pEOF = &bEOF; nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write ); @@ -2599,7 +2599,7 @@ namespace osl_File void isEndOfFile_002() { ::osl::File testFile( aTmpName4 ); - sal_Bool bEOF = sal_False; + sal_Bool bEOF = false; sal_Bool *pEOF = &bEOF; sal_uInt64 nFilePointer = 0; @@ -2608,7 +2608,7 @@ namespace osl_File nError1 = testFile.setPos( osl_Pos_Absolut, 0 ); CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 ); - *pEOF = sal_False; + *pEOF = false; while ( !( *pEOF ) ) { nError1 = testFile.isEndOfFile( pEOF ); @@ -2952,7 +2952,7 @@ namespace osl_File void readLine_002() { ::osl::File testFile( aTmpName6 ); - sal_Bool bEOF = sal_False; + sal_Bool bEOF = false; sal_Bool *pEOF = &bEOF; nError1 = testFile.open( osl_File_OpenFlag_Read | osl_File_OpenFlag_Write ); diff --git a/sal/qa/osl/module/osl_Module_DLL.cxx b/sal/qa/osl/module/osl_Module_DLL.cxx index ef1a87c9a029..1e9e33868d63 100644 --- a/sal/qa/osl/module/osl_Module_DLL.cxx +++ b/sal/qa/osl/module/osl_Module_DLL.cxx @@ -29,7 +29,7 @@ CPPUNIT_PLUGIN_IMPLEMENT(); extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL firstfunc( sal_Bool ) { - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/qa/rtl/uuid/rtl_Uuid.cxx b/sal/qa/rtl/uuid/rtl_Uuid.cxx index 2ceef782385b..714d4b27555a 100644 --- a/sal/qa/rtl/uuid/rtl_Uuid.cxx +++ b/sal/qa/rtl/uuid/rtl_Uuid.cxx @@ -48,7 +48,7 @@ public: sal_Int32 i,i2; for( i = 0 ; i < TEST_UUID ; i ++ ) { - rtl_createUuid( aNode[i], nullptr, sal_False ); + rtl_createUuid( aNode[i], nullptr, false ); } bool bRes = true; for( i = 0 ; i < TEST_UUID ; i ++ ) diff --git a/sal/rtl/byteseq.cxx b/sal/rtl/byteseq.cxx index 891c492f2db2..d0c77b5dc1ed 100644 --- a/sal/rtl/byteseq.cxx +++ b/sal/rtl/byteseq.cxx @@ -219,11 +219,11 @@ sal_Bool SAL_CALL rtl_byte_sequence_equals( sal_Sequence *pSequence1 , sal_Seque assert(pSequence1 && pSequence2); if (pSequence1 == pSequence2) { - return sal_True; + return true; } if (pSequence1->nElements != pSequence2->nElements) { - return sal_False; + return false; } return memcmp( diff --git a/sal/rtl/locale.cxx b/sal/rtl/locale.cxx index bd232c1a768a..751c23c5a941 100644 --- a/sal/rtl/locale.cxx +++ b/sal/rtl/locale.cxx @@ -170,13 +170,13 @@ sal_Bool rtl_hashtable_grow(RTL_HASHTABLE** table) rtl_freeMemory((*table)); (*table) = pNewTable; - return sal_True; + return true; } extern "C" sal_Bool rtl_hashtable_find(RTL_HASHTABLE * table, sal_Int32 key, sal_Int32 hashCode, rtl_Locale** pValue) { if (!table) - return sal_False; + return false; if (table->Table[key]) { @@ -188,11 +188,11 @@ extern "C" sal_Bool rtl_hashtable_find(RTL_HASHTABLE * table, sal_Int32 key, sal if (pEntry) *pValue = pEntry->Entry; else - return sal_False; + return false; } else - return sal_False; + return false; - return sal_True; + return true; } /************************************************************************* diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx index 98954fab90fa..863d6b870b3e 100644 --- a/sal/rtl/string.cxx +++ b/sal/rtl/string.cxx @@ -94,7 +94,7 @@ sal_Int32 SAL_CALL rtl_str_valueOfFloat(sal_Char * pStr, float f) rtl_math_doubleToString( &pResult, nullptr, 0, f, rtl_math_StringFormat_G, RTL_STR_MAX_VALUEOFFLOAT - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr, 0, - sal_True); + true); nLen = pResult->length; OSL_ASSERT(nLen < RTL_STR_MAX_VALUEOFFLOAT); memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Char)); @@ -111,7 +111,7 @@ sal_Int32 SAL_CALL rtl_str_valueOfDouble(sal_Char * pStr, double d) rtl_math_doubleToString( &pResult, nullptr, 0, d, rtl_math_StringFormat_G, RTL_STR_MAX_VALUEOFDOUBLE - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr, - 0, sal_True); + 0, true); nLen = pResult->length; OSL_ASSERT(nLen < RTL_STR_MAX_VALUEOFDOUBLE); memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Char)); diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx index df0d1a2e52cf..f188cb1e9d42 100644 --- a/sal/rtl/strtmpl.cxx +++ b/sal/rtl/strtmpl.cxx @@ -972,7 +972,7 @@ sal_Bool SAL_CALL IMPL_RTL_STRNAME( toBoolean )( const IMPL_RTL_STRCODE* pStr ) { assert(pStr); if ( *pStr == '1' ) - return sal_True; + return true; if ( (*pStr == 'T') || (*pStr == 't') ) { @@ -984,12 +984,12 @@ sal_Bool SAL_CALL IMPL_RTL_STRNAME( toBoolean )( const IMPL_RTL_STRCODE* pStr ) { pStr++; if ( (*pStr == 'E') || (*pStr == 'e') ) - return sal_True; + return true; } } } - return sal_False; + return false; } /* ----------------------------------------------------------------------- */ diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx index db07cabb396b..b00c9c80ef76 100644 --- a/sal/rtl/ustring.cxx +++ b/sal/rtl/ustring.cxx @@ -154,7 +154,7 @@ sal_Int32 SAL_CALL rtl_ustr_valueOfFloat(sal_Unicode * pStr, float f) rtl_math_doubleToUString( &pResult, nullptr, 0, f, rtl_math_StringFormat_G, RTL_USTR_MAX_VALUEOFFLOAT - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr, - 0, sal_True); + 0, true); nLen = pResult->length; OSL_ASSERT(nLen < RTL_USTR_MAX_VALUEOFFLOAT); memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Unicode)); @@ -171,7 +171,7 @@ sal_Int32 SAL_CALL rtl_ustr_valueOfDouble(sal_Unicode * pStr, double d) rtl_math_doubleToUString( &pResult, nullptr, 0, d, rtl_math_StringFormat_G, RTL_USTR_MAX_VALUEOFDOUBLE - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr, - 0, sal_True); + 0, true); nLen = pResult->length; OSL_ASSERT(nLen < RTL_USTR_MAX_VALUEOFDOUBLE); memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Unicode)); @@ -350,10 +350,10 @@ sal_Bool SAL_CALL rtl_ustr_asciil_reverseEquals_WithLength( const sal_Unicode* p pStr1Run--; pStr2Run--; if( *pStr1Run != (sal_Unicode)*pStr2Run ) - return sal_False; + return false; } - return sal_True; + return true; } /* ----------------------------------------------------------------------- */ |