summaryrefslogtreecommitdiff
path: root/sal/osl/w32
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-11 13:20:49 +0200
committerNoel Grandin <noel@peralex.com>2015-02-23 09:26:58 +0200
commitba233e87efddf0a6751b35784dca1c805364ff3b (patch)
tree9d7c8a4256e688c2d47cb6ecf580ac196c4da2c0 /sal/osl/w32
parenta2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072 (diff)
remove unnecessary parenthesis in return statements
found with $ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;' Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
Diffstat (limited to 'sal/osl/w32')
-rw-r--r--sal/osl/w32/conditn.c6
-rw-r--r--sal/osl/w32/file.cxx44
-rw-r--r--sal/osl/w32/pipe.c8
-rw-r--r--sal/osl/w32/process.cxx10
-rw-r--r--sal/osl/w32/profile.cxx112
-rw-r--r--sal/osl/w32/security.c16
-rw-r--r--sal/osl/w32/signal.cxx16
-rw-r--r--sal/osl/w32/socket.cxx8
-rw-r--r--sal/osl/w32/thread.c14
-rw-r--r--sal/osl/w32/time.c2
10 files changed, 118 insertions, 118 deletions
diff --git a/sal/osl/w32/conditn.c b/sal/osl/w32/conditn.c
index 1f83cd1cb1a2..b86ad1a3f377 100644
--- a/sal/osl/w32/conditn.c
+++ b/sal/osl/w32/conditn.c
@@ -110,13 +110,13 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition,
break;
case WAIT_OBJECT_0:
- return (osl_cond_result_ok);
+ return osl_cond_result_ok;
case WAIT_TIMEOUT:
- return (osl_cond_result_timeout);
+ return osl_cond_result_timeout;
default:
- return (osl_cond_result_error);
+ return osl_cond_result_error;
}
}
}
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index 1d13804e01b3..181e041c29bd 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -383,7 +383,7 @@ oslFileError FileHandle_Impl::readFileAt (
// flush current buffer
oslFileError result = syncFile();
if (result != osl_File_E_None)
- return (result);
+ return result;
m_bufptr = -1, m_buflen = 0;
if (nBytesRequested >= m_bufsiz)
@@ -392,7 +392,7 @@ oslFileError FileHandle_Impl::readFileAt (
sal_uInt64 uDone = 0;
result = readAt (nOffset, &(buffer[*pBytesRead]), nBytesRequested, &uDone);
if (result != osl_File_E_None)
- return (result);
+ return result;
nBytesRequested -= sal::static_int_cast< DWORD >(uDone), *pBytesRead += uDone;
return osl_File_E_None;
@@ -402,7 +402,7 @@ oslFileError FileHandle_Impl::readFileAt (
sal_uInt64 uDone = 0;
result = readAt (bufptr, m_buffer, m_bufsiz, &uDone);
if (result != osl_File_E_None)
- return (result);
+ return result;
m_bufptr = bufptr, m_buflen = sal::static_int_cast< SIZE_T >(uDone);
}
if (bufpos >= m_buflen)
@@ -456,7 +456,7 @@ oslFileError FileHandle_Impl::writeFileAt (
// flush current buffer
oslFileError result = syncFile();
if (result != osl_File_E_None)
- return (result);
+ return result;
m_bufptr = -1, m_buflen = 0;
if (nBytesToWrite >= m_bufsiz)
@@ -465,7 +465,7 @@ oslFileError FileHandle_Impl::writeFileAt (
sal_uInt64 uDone = 0;
result = writeAt (nOffset, &(buffer[*pBytesWritten]), nBytesToWrite, &uDone);
if (result != osl_File_E_None)
- return (result);
+ return result;
if (uDone != nBytesToWrite)
return osl_File_E_IO;
@@ -477,7 +477,7 @@ oslFileError FileHandle_Impl::writeFileAt (
sal_uInt64 uDone = 0;
result = readAt (bufptr, m_buffer, m_bufsiz, &uDone);
if (result != osl_File_E_None)
- return (result);
+ return result;
m_bufptr = bufptr, m_buflen = sal::static_int_cast< SIZE_T >(uDone);
}
@@ -505,13 +505,13 @@ oslFileError FileHandle_Impl::readLineAt (
/* flush current buffer */
result = syncFile();
if (result != osl_File_E_None)
- return (result);
+ return result;
/* update buffer (pointer) */
sal_uInt64 uDone = 0;
result = readAt (bufptr, m_buffer, m_bufsiz, &uDone);
if (result != osl_File_E_None)
- return (result);
+ return result;
m_bufptr = bufptr, m_buflen = sal::static_int_cast< SIZE_T >(uDone);
}
@@ -534,7 +534,7 @@ oslFileError FileHandle_Impl::readLineAt (
result = writeSequence_Impl (
ppSequence, &dstpos, &(m_buffer[bufpos]), curpos - bufpos);
if (result != osl_File_E_None)
- return (result);
+ return result;
*pBytesRead += curpos - bufpos, nOffset += curpos - bufpos;
}
@@ -545,7 +545,7 @@ oslFileError FileHandle_Impl::readLineAt (
sal_uInt64 uDone = 0;
result = readAt (bufptr, m_buffer, m_bufsiz, &uDone);
if (result != osl_File_E_None)
- return (result);
+ return result;
m_bufptr = bufptr, m_buflen = sal::static_int_cast< SIZE_T >(uDone);
}
@@ -591,7 +591,7 @@ oslFileError FileHandle_Impl::readLineAt (
result = writeSequence_Impl (
ppSequence, &dstpos, &(m_buffer[bufpos]), curpos - bufpos - 1);
if (result != osl_File_E_None)
- return (result);
+ return result;
*pBytesRead += curpos - bufpos, nOffset += curpos - bufpos;
}
break;
@@ -600,7 +600,7 @@ oslFileError FileHandle_Impl::readLineAt (
result = writeSequence_Impl (ppSequence, &dstpos, 0, 0);
if (result != osl_File_E_None)
- return (result);
+ return result;
if (0 < dstpos)
return osl_File_E_None;
if (bufpos >= m_buflen)
@@ -641,12 +641,12 @@ oslFileError FileHandle_Impl::syncFile()
sal_uInt64 uDone = 0;
result = writeAt (m_bufptr, m_buffer, m_buflen, &uDone);
if (result != osl_File_E_None)
- return (result);
+ return result;
if (uDone != m_buflen)
return osl_File_E_IO;
m_state &= ~STATE_MODIFIED;
}
- return (result);
+ return result;
}
// File I/O functions
@@ -688,7 +688,7 @@ SAL_CALL osl_createFileHandleFromOSHandle (
!((uFlags & osl_File_OpenFlag_Read) || (uFlags & osl_File_OpenFlag_Write)),
"sal.osl",
"osl_createFileHandleFromOSHandle(): missing read/write access flags");
- return (oslFileHandle)(pImpl);
+ return (oslFileHandle)pImpl;
}
oslFileError
@@ -700,7 +700,7 @@ SAL_CALL osl_openFile(
rtl_uString * strSysPath = 0;
oslFileError result = _osl_getSystemPathFromFileURL( strPath, &strSysPath, sal_False );
if (result != osl_File_E_None)
- return (result);
+ return result;
DWORD dwAccess = GENERIC_READ, dwShare = FILE_SHARE_READ, dwCreation = 0, dwAttributes = 0;
@@ -728,7 +728,7 @@ SAL_CALL osl_openFile(
*pHandle = osl_createFileHandleFromOSHandle (hFile, uFlags | osl_File_OpenFlag_Read);
rtl_uString_release( strSysPath );
- return (result);
+ return result;
}
oslFileError
@@ -773,7 +773,7 @@ SAL_CALL osl_closeFile(oslFileHandle Handle)
::LeaveCriticalSection (&(pImpl->m_mutex));
delete pImpl;
- return (result);
+ return result;
}
oslFileError
@@ -882,7 +882,7 @@ SAL_CALL osl_readLine(
pImpl->m_filepos, ppSequence, &uBytesRead);
if (result == osl_File_E_None)
pImpl->m_filepos += uBytesRead;
- return (result);
+ return result;
}
oslFileError
@@ -902,7 +902,7 @@ SAL_CALL osl_readFile(
pImpl->m_filepos, pBuffer, uBytesRequested, pBytesRead);
if (result == osl_File_E_None)
pImpl->m_filepos += *pBytesRead;
- return (result);
+ return result;
}
oslFileError
@@ -923,7 +923,7 @@ SAL_CALL osl_writeFile(
pImpl->m_filepos, pBuffer, uBytesToWrite, pBytesWritten);
if (result == osl_File_E_None)
pImpl->m_filepos += *pBytesWritten;
- return (result);
+ return result;
}
oslFileError
@@ -1074,7 +1074,7 @@ SAL_CALL osl_setFileSize (oslFileHandle Handle, sal_uInt64 uSize)
FileHandle_Impl::Guard lock (&(pImpl->m_mutex));
oslFileError result = pImpl->syncFile();
if (result != osl_File_E_None)
- return (result);
+ return result;
pImpl->m_bufptr = -1, pImpl->m_buflen = 0;
return pImpl->setSize (uSize);
diff --git a/sal/osl/w32/pipe.c b/sal/osl/w32/pipe.c
index 40fdde642c98..bbcdf098e4b4 100644
--- a/sal/osl/w32/pipe.c
+++ b/sal/osl/w32/pipe.c
@@ -234,7 +234,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options
rtl_uString_release( name );
rtl_uString_release( path );
- return (pPipe);
+ return pPipe;
}
else
{
@@ -401,7 +401,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
}
}
- return (nBytes);
+ return nBytes;
}
/*****************************************************************************/
@@ -432,7 +432,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
pPipe->m_Error = osl_Pipe_E_ConnectionAbort;
}
- return (nBytes);
+ return nBytes;
}
sal_Int32 SAL_CALL osl_writePipe( oslPipe pPipe, const void *pBuffer , sal_Int32 n )
@@ -502,7 +502,7 @@ oslPipeError SAL_CALL osl_getLastPipeError(oslPipe pPipe)
else
Error = osl_Pipe_E_NotFound;
- return (Error);
+ return Error;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 23001f9cd4c6..722342867d0e 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -76,7 +76,7 @@ oslProcess SAL_CALL osl_getProcess(oslProcessIdentifier Ident)
else
pProcImpl = NULL;
- return (pProcImpl);
+ return pProcImpl;
}
/***************************************************************************/
@@ -229,7 +229,7 @@ oslProcessError bootstrap_getExecutableFile(rtl_uString ** ppFileURL)
}
}
- return (result);
+ return result;
}
}
@@ -296,7 +296,7 @@ static rtl_uString ** osl_createCommandArgs_Impl (int argc, char **)
}
}
}
- return (ppArgs);
+ return ppArgs;
}
#ifdef _MSC_VER
@@ -337,7 +337,7 @@ sal_uInt32 SAL_CALL osl_getCommandArgCount(void)
}
osl_releaseMutex (*osl_getGlobalMutex());
- return (result);
+ return result;
}
/***************************************************************************/
@@ -356,7 +356,7 @@ oslProcessError SAL_CALL osl_getCommandArg( sal_uInt32 nArg, rtl_uString **strCo
}
osl_releaseMutex (*osl_getGlobalMutex());
- return (result);
+ return result;
}
/***************************************************************************/
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 980e515d7e6f..199b618bdbc0 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -223,7 +223,7 @@ oslProfile SAL_CALL osl_openProfile(rtl_uString *strProfileName, sal_uInt32 Flag
if( FileName)
rtl_uString_release( FileName);
- return (NULL);
+ return NULL;
}
pProfile = (osl_TProfileImpl*)calloc(1, sizeof(osl_TProfileImpl));
@@ -247,7 +247,7 @@ oslProfile SAL_CALL osl_openProfile(rtl_uString *strProfileName, sal_uInt32 Flag
if( FileName)
rtl_uString_release( FileName);
- return (pProfile);
+ return pProfile;
}
sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile)
@@ -329,7 +329,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile)
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out osl_closeProfile [ok]");
#endif
- return (sal_True);
+ return sal_True;
}
sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile)
@@ -397,7 +397,7 @@ static sal_Bool writeProfileImpl(osl_TFile* pFile)
OSL_ENSURE(bRet,"WriteFile failed!!!");
OSL_TRACE("write failed '%s'",strerror(errno));
- return (sal_False);
+ return sal_False;
}
free(pFile->m_pWriteBuf);
@@ -432,7 +432,7 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile,
OSL_TRACE("Out osl_readProfileString [pProfile==0]");
#endif
- return (sal_False);
+ return sal_False;
}
if (! (pProfile->m_Flags & osl_Profile_SYSTEM))
@@ -471,14 +471,14 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile,
OSL_TRACE("Out osl_readProfileString [pStr==0]");
#endif
- return (sal_False);
+ return sal_False;
}
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out osl_readProfileString [ok]");
#endif
- return (sal_True);
+ return sal_True;
}
sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile,
@@ -508,7 +508,7 @@ sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile,
OSL_TRACE("Out osl_readProfileBool [ok]");
#endif
- return (Default);
+ return Default;
}
sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile,
@@ -540,7 +540,7 @@ sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile,
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out osl_readProfileIdent [ok]");
#endif
- return (Default);
+ return Default;
}
sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile,
@@ -566,7 +566,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile,
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out osl_writeProfileString [pProfile==0]");
#endif
- return (sal_False);
+ return sal_False;
}
if (! (pProfile->m_Flags & osl_Profile_SYSTEM))
@@ -588,7 +588,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile,
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out osl_writeProfileString [not added]");
#endif
- return (sal_False);
+ return sal_False;
}
pSec = &pProfile->m_Sections[pProfile->m_NoSections - 1];
@@ -614,7 +614,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile,
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out osl_writeProfileString [not inserted]");
#endif
- return (sal_False);
+ return sal_False;
}
pProfile->m_Flags |= FLG_MODIFIED;
@@ -710,7 +710,7 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile,
OSL_TRACE("Out osl_removeProfileEntry [pProfile==0]");
#endif
- return (sal_False);
+ return sal_False;
}
if (! (pProfile->m_Flags & osl_Profile_SYSTEM))
@@ -769,7 +769,7 @@ sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, const sal_C
OSL_TRACE("Out osl_getProfileSectionEntries [pProfile=0]");
#endif
- return (0);
+ return 0;
}
if (! (pProfile->m_Flags & osl_Profile_SYSTEM))
@@ -820,7 +820,7 @@ sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, const sal_C
OSL_TRACE("Out osl_getProfileSectionEntries [ok]");
#endif
- return (n);
+ return n;
}
sal_Bool SAL_CALL osl_getProfileName(rtl_uString* strPath, rtl_uString* strName, rtl_uString** strProfileName)
@@ -909,7 +909,7 @@ sal_Bool SAL_CALL osl_getProfileName(rtl_uString* strPath, rtl_uString* strName,
bFailed = ! osl_getHomeDir(security, &strHome);
osl_freeSecurityHandle(security);
- if (bFailed) return (sal_False);
+ if (bFailed) return sal_False;
if ( ::sal::static_int_cast< sal_uInt32 >( strHome->length ) >= aPath.getBufSizeInSymbols())
return sal_False;
@@ -941,7 +941,7 @@ sal_Bool SAL_CALL osl_getProfileName(rtl_uString* strPath, rtl_uString* strName,
bFailed = ! osl_getConfigDir(security, &strConfig);
osl_freeSecurityHandle(security);
- if (bFailed) return (sal_False);
+ if (bFailed) return sal_False;
if ( ::sal::static_int_cast< sal_uInt32 >( strConfig->length ) >= aPath.getBufSizeInSymbols())
return sal_False;
@@ -968,7 +968,7 @@ sal_Bool SAL_CALL osl_getProfileName(rtl_uString* strPath, rtl_uString* strName,
((nLen == RTL_CONSTASCII_LENGTH(STR_INI_METASYS)) || (pPath[RTL_CONSTASCII_LENGTH(STR_INI_METASYS)] == '/')))
{
if (((nPathLen = GetWindowsDirectoryW(::osl::mingw_reinterpret_cast<LPWSTR>(aPath), aPath.getBufSizeInSymbols())) == 0) || (nPathLen >= aPath.getBufSizeInSymbols()))
- return (sal_False);
+ return sal_False;
if (nLen > RTL_CONSTASCII_LENGTH(STR_INI_METASYS))
{
@@ -988,7 +988,7 @@ sal_Bool SAL_CALL osl_getProfileName(rtl_uString* strPath, rtl_uString* strName,
(pPath[RTL_CONSTASCII_LENGTH(STR_INI_METAINS)] == '"') ) )
{
if (! lookupProfile(pPath + RTL_CONSTASCII_LENGTH(STR_INI_METAINS), aFile, aPath))
- return (sal_False);
+ return sal_False;
nPathLen = rtl_ustr_getLength(aPath);
}
@@ -1009,7 +1009,7 @@ sal_Bool SAL_CALL osl_getProfileName(rtl_uString* strPath, rtl_uString* strName,
bFailed = ! osl_getConfigDir(security, &strConfigDir);
osl_freeSecurityHandle(security);
- if (bFailed) return (sal_False);
+ if (bFailed) return sal_False;
if ( ::sal::static_int_cast< sal_uInt32 >( strConfigDir->length ) >= aPath.getBufSizeInSymbols() )
return sal_False;
@@ -1044,7 +1044,7 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuff
osl_TProfileImpl* pProfile = acquireProfile(Profile, sal_False);
if (pProfile == NULL)
- return (0);
+ return 0;
if (! (pProfile->m_Flags & osl_Profile_SYSTEM))
{
@@ -1085,7 +1085,7 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuff
releaseProfile(pProfile);
- return (n);
+ return n;
}
/*****************************************************************************/
@@ -1100,7 +1100,7 @@ static osl_TStamp getFileStamp(osl_TFile* pFile)
(! GetFileTime(pFile->m_Handle, NULL, NULL, &FileTime)))
memset(&FileTime, 0, sizeof(FileTime));
- return (FileTime);
+ return FileTime;
}
static sal_Bool lockFile(const osl_TFile* pFile, osl_TLockMode eMode)
@@ -1109,7 +1109,7 @@ static sal_Bool lockFile(const osl_TFile* pFile, osl_TLockMode eMode)
OVERLAPPED Overlapped;
if (pFile->m_Handle == INVALID_HANDLE_VALUE)
- return (sal_False);
+ return sal_False;
memset(&Overlapped, 0, sizeof(Overlapped));
@@ -1132,7 +1132,7 @@ static sal_Bool lockFile(const osl_TFile* pFile, osl_TLockMode eMode)
break;
}
- return (status);
+ return status;
}
static osl_TFile* openFileImpl(rtl_uString * strFileName, oslProfileOption ProfileFlags )
@@ -1169,7 +1169,7 @@ static osl_TFile* openFileImpl(rtl_uString * strFileName, oslProfileOption Profi
== INVALID_HANDLE_VALUE)
{
free(pFile);
- return (NULL);
+ return NULL;
}
}
@@ -1186,7 +1186,7 @@ static osl_TFile* openFileImpl(rtl_uString * strFileName, oslProfileOption Profi
lockFile(pFile, bWriteable ? write_lock : read_lock);
}
- return (pFile);
+ return pFile;
}
static osl_TStamp closeFileImpl(osl_TFile* pFile)
@@ -1215,7 +1215,7 @@ static osl_TStamp closeFileImpl(osl_TFile* pFile)
free(pFile);
- return(stamp);
+ return stamp;
}
static sal_Bool rewindFile(osl_TFile* pFile, sal_Bool bTruncate)
@@ -1230,7 +1230,7 @@ static sal_Bool rewindFile(osl_TFile* pFile, sal_Bool bTruncate)
SetEndOfFile(pFile->m_Handle);
}
- return (sal_True);
+ return sal_True;
}
static sal_Bool getLine(osl_TFile* pFile, const sal_Char *pszLine, int MaxLen)
@@ -1241,7 +1241,7 @@ static sal_Bool getLine(osl_TFile* pFile, const sal_Char *pszLine, int MaxLen)
sal_Char* pLine = (sal_Char *)pszLine;
if (pFile->m_Handle == INVALID_HANDLE_VALUE)
- return (sal_False);
+ return sal_False;
MaxLen -= 1;
@@ -1260,7 +1260,7 @@ static sal_Bool getLine(osl_TFile* pFile, const sal_Char *pszLine, int MaxLen)
if (! ReadFile(pFile->m_Handle, &pFile->m_ReadBuf[Bytes], Free, &Max, NULL))
{
*pLine = '\0';
- return (sal_False);
+ return sal_False;
}
if (Max < Free)
@@ -1268,7 +1268,7 @@ static sal_Bool getLine(osl_TFile* pFile, const sal_Char *pszLine, int MaxLen)
if ((Max == 0) && (pLine == pszLine))
{
*pLine = '\0';
- return (sal_False);
+ return sal_False;
}
pFile->m_ReadBuf[Bytes + Max] = '\0';
@@ -1309,7 +1309,7 @@ static sal_Bool getLine(osl_TFile* pFile, const sal_Char *pszLine, int MaxLen)
}
while (MaxLen > 0);
- return (sal_True);
+ return sal_True;
}
static sal_Bool putLine(osl_TFile* pFile, const sal_Char *pszLine)
@@ -1318,7 +1318,7 @@ static sal_Bool putLine(osl_TFile* pFile, const sal_Char *pszLine)
if ( pFile == 0 || pFile->m_Handle == INVALID_HANDLE_VALUE )
{
- return (sal_False);
+ return sal_False;
}
if ( pFile->m_pWriteBuf == 0 )
@@ -1353,7 +1353,7 @@ static sal_Bool putLine(osl_TFile* pFile, const sal_Char *pszLine)
pFile->m_nWriteBufFree-=Len+2;
- return (sal_True);
+ return sal_True;
}
/* platform specific end */
@@ -1375,7 +1375,7 @@ static const sal_Char* stripBlanks(const sal_Char* String, sal_uInt32* pLen)
while ((*String == ' ') || (*String == '\t'))
String++;
- return (String);
+ return String;
}
static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line)
@@ -1406,7 +1406,7 @@ static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line)
{
pProfile->m_NoLines = 0;
pProfile->m_MaxLines = 0;
- return (NULL);
+ return NULL;
}
}
@@ -1417,7 +1417,7 @@ static const sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line)
}
pProfile->m_Lines[pProfile->m_NoLines++] = strdup(Line);
- return (pProfile->m_Lines[pProfile->m_NoLines - 1]);
+ return pProfile->m_Lines[pProfile->m_NoLines - 1];
}
static const sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Line, sal_uInt32 LineNo)
@@ -1445,7 +1445,7 @@ static const sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Li
{
pProfile->m_NoLines = 0;
pProfile->m_MaxLines = 0;
- return (NULL);
+ return NULL;
}
}
@@ -1476,7 +1476,7 @@ static const sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Li
pProfile->m_Lines[LineNo] = strdup(Line);
- return (pProfile->m_Lines[LineNo]);
+ return pProfile->m_Lines[LineNo];
}
static void removeLine(osl_TProfileImpl* pProfile, sal_uInt32 LineNo)
@@ -1556,7 +1556,7 @@ static sal_Bool addEntry(osl_TProfileImpl* pProfile, osl_TProfileSection *pSecti
{
pSection->m_NoEntries = 0;
pSection->m_MaxEntries = 0;
- return (sal_False);
+ return sal_False;
}
}
@@ -1566,10 +1566,10 @@ static sal_Bool addEntry(osl_TProfileImpl* pProfile, osl_TProfileSection *pSecti
setEntry(pProfile, pSection, pSection->m_NoEntries - 1, Line,
Entry, Len);
- return (sal_True);
+ return sal_True;
}
- return (sal_False);
+ return sal_False;
}
static void removeEntry(osl_TProfileSection *pSection, sal_uInt32 NoEntry)
@@ -1620,7 +1620,7 @@ static sal_Bool addSection(osl_TProfileImpl* pProfile, int Line, const sal_Char*
{
pProfile->m_NoSections = 0;
pProfile->m_MaxSections = 0;
- return (sal_False);
+ return sal_False;
}
}
@@ -1639,7 +1639,7 @@ static sal_Bool addSection(osl_TProfileImpl* pProfile, int Line, const sal_Char*
pProfile->m_Sections[pProfile->m_NoSections - 1].m_Offset = Section - pProfile->m_Lines[Line];
pProfile->m_Sections[pProfile->m_NoSections - 1].m_Len = Len;
- return (sal_True);
+ return sal_True;
}
static void removeSection(osl_TProfileImpl* pProfile, osl_TProfileSection *pSection)
@@ -1720,7 +1720,7 @@ static sal_uInt32 Sect = 0;
else
pSec = NULL;
- return (pSec);
+ return pSec;
}
static sal_Bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile)
@@ -1738,7 +1738,7 @@ static sal_Bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile)
while (getLine(pFile, Line, sizeof(Line)))
{
if (! addLine(pProfile, Line))
- return (sal_False);
+ return sal_False;
}
for (i = 0; i < pProfile->m_NoLines; i++)
@@ -1761,17 +1761,17 @@ static sal_Bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile)
if (! addEntry(pProfile, &pProfile->m_Sections[pProfile->m_NoSections - 1],
i, pStr, pChar - pStr))
- return (sal_False);
+ return sal_False;
}
else
{
/* new section */
if (! addSection(pProfile, i, pStr + 1, pChar - pStr - 1))
- return (sal_False);
+ return sal_False;
}
}
- return (sal_True);
+ return sal_True;
}
static sal_Bool storeProfile(osl_TProfileImpl* pProfile, sal_Bool bCleanup)
@@ -1851,7 +1851,7 @@ static sal_Bool storeProfile(osl_TProfileImpl* pProfile, sal_Bool bCleanup)
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out storeProfile [ok]");
#endif
- return (sal_True);
+ return sal_True;
}
static osl_TFile* osl_openTmpProfileImpl(osl_TProfileImpl* pProfile)
@@ -2011,13 +2011,13 @@ static osl_TProfileImpl* acquireProfile(oslProfile Profile, sal_Bool bWriteable)
/* A readlock file could not be written */
if ((pProfile->m_Flags & osl_Profile_READLOCK) && bWriteable)
{
- return (NULL);
+ return NULL;
}
}
}
}
- return (pProfile);
+ return pProfile;
}
static sal_Bool releaseProfile(osl_TProfileImpl* pProfile)
@@ -2041,7 +2041,7 @@ static sal_Bool releaseProfile(osl_TProfileImpl* pProfile)
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out releaseProfile [AUTOOPEN]");
#endif
- return (osl_closeProfile((oslProfile)pProfile));
+ return osl_closeProfile((oslProfile)pProfile);
}
else
{
@@ -2063,7 +2063,7 @@ static sal_Bool releaseProfile(osl_TProfileImpl* pProfile)
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out releaseProfile [ok]");
#endif
- return (sal_True);
+ return sal_True;
}
static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *strFile, sal_Unicode *strProfile)
@@ -2254,7 +2254,7 @@ static sal_Bool lookupProfile(const sal_Unicode *strPath, const sal_Unicode *str
/* try to find the file in the directory of the executbale */
if (osl_getExecutableFile(&strTmp) != osl_Process_E_None)
- return (sal_False);
+ return sal_False;
/* convert to native path */
if (osl_getSystemPathFromFileURL(strTmp, &strExecutable) != osl_File_E_None)
diff --git a/sal/osl/w32/security.c b/sal/osl/w32/security.c
index d4d7d125675d..cc4a1b0853a7 100644
--- a/sal/osl/w32/security.c
+++ b/sal/osl/w32/security.c
@@ -90,7 +90,7 @@ oslSecurity SAL_CALL osl_getCurrentSecurity(void)
pSecImpl->m_hToken = NULL;
pSecImpl->m_hProfile = NULL;
- return ((oslSecurity)pSecImpl);
+ return (oslSecurity)pSecImpl;
}
oslSecurityError SAL_CALL osl_loginUser( rtl_uString *strUserName, rtl_uString *strPasswd, oslSecurity *pSecurity )
@@ -269,10 +269,10 @@ sal_Bool SAL_CALL osl_isAdministrator(oslSecurity Security)
if ( hImpersonationToken )
CloseHandle( hImpersonationToken );
- return (bSuccess);
+ return bSuccess;
}
else
- return (sal_False);
+ return sal_False;
}
void SAL_CALL osl_freeSecurityHandle(oslSecurity Security)
@@ -389,7 +389,7 @@ sal_Bool SAL_CALL osl_getUserIdent(oslSecurity Security, rtl_uString **strIdent)
free(pInfoBuffer);
free(Ident);
- return (sal_True);
+ return sal_True;
}
}
else
@@ -749,7 +749,7 @@ static sal_Bool GetSpecialFolder(rtl_uString **strPath, int nFolder)
FreeLibrary(hLibrary);
- return (bRet);
+ return bRet;
}
static BOOL Privilege(LPTSTR strPrivilege, BOOL bEnable)
@@ -848,7 +848,7 @@ static sal_Bool SAL_CALL getUserNameImpl(oslSecurity Security, rtl_uString **str
free(pInfoBuffer);
- return (sal_True);
+ return sal_True;
}
}
else
@@ -865,7 +865,7 @@ static sal_Bool SAL_CALL getUserNameImpl(oslSecurity Security, rtl_uString **str
if (pNameW)
free(pNameW);
- return (sal_True);
+ return sal_True;
}
else
if (wcslen(pSecImpl->m_User) > 0)
@@ -875,7 +875,7 @@ static sal_Bool SAL_CALL getUserNameImpl(oslSecurity Security, rtl_uString **str
if (pNameW)
free(pNameW);
- return (sal_True);
+ return sal_True;
}
if (pNameW)
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 470c1f622675..28979f35a41e 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -149,10 +149,10 @@ static long WINAPI SignalHandlerFunction(LPEXCEPTION_POINTERS lpEP)
switch ( Action )
{
case osl_Signal_ActCallNextHdl:
- return (EXCEPTION_CONTINUE_SEARCH);
+ return EXCEPTION_CONTINUE_SEARCH;
case osl_Signal_ActAbortApp:
- return (EXCEPTION_EXECUTE_HANDLER);
+ return EXCEPTION_EXECUTE_HANDLER;
case osl_Signal_ActKillApp:
SetErrorMode(SEM_NOGPFAULTERRORBOX);
@@ -162,7 +162,7 @@ static long WINAPI SignalHandlerFunction(LPEXCEPTION_POINTERS lpEP)
break;
}
- return (EXCEPTION_CONTINUE_EXECUTION);
+ return EXCEPTION_CONTINUE_EXECUTION;
}
/*****************************************************************************/
@@ -191,10 +191,10 @@ oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction Handler,
osl_releaseMutex(SignalListMutex);
- return (pHandler);
+ return pHandler;
}
- return (NULL);
+ return NULL;
}
/*****************************************************************************/
@@ -229,7 +229,7 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler Handler)
free(pHandler);
- return (sal_True);
+ return sal_True;
}
pPrevious = pHandler;
@@ -238,7 +238,7 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler Handler)
osl_releaseMutex(SignalListMutex);
- return (sal_False);
+ return sal_False;
}
/*****************************************************************************/
@@ -262,7 +262,7 @@ oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 UserSignal, void* UserData)
osl_releaseMutex(SignalListMutex);
- return (Action);
+ return Action;
}
/*****************************************************************************/
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index 8722142e71cb..25eec51bc484 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -365,7 +365,7 @@ static sal_Bool __osl_querySocketDialupImpl (void)
}
LeaveCriticalSection (&pDialupImpl->m_hMutex);
- return (result);
+ return result;
}
/*
@@ -398,7 +398,7 @@ static sal_Bool __osl_attemptSocketDialupImpl (void)
}
LeaveCriticalSection (&pDialupImpl->m_hMutex);
- return (result);
+ return result;
}
/*****************************************************************************/
@@ -560,7 +560,7 @@ sal_Bool SAL_CALL osl_isEqualSocketAddr(oslSocketAddr Addr1, oslSocketAddr Addr2
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 sal_True;
}
default:
@@ -570,7 +570,7 @@ sal_Bool SAL_CALL osl_isEqualSocketAddr(oslSocketAddr Addr1, oslSocketAddr Addr2
}
}
- return (sal_False);
+ return sal_False;
}
/*****************************************************************************/
diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c
index 2eeea0681550..eb7f222ec5d6 100644
--- a/sal/osl/w32/thread.c
+++ b/sal/osl/w32/thread.c
@@ -58,7 +58,7 @@ static unsigned __stdcall oslWorkerWrapperFunction(void* pData)
CoUninitialize();
- return (0);
+ return 0;
}
/*****************************************************************************/
@@ -128,9 +128,9 @@ oslThreadIdentifier SAL_CALL osl_getThreadIdentifier(oslThread Thread)
osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread;
if (pThreadImpl != NULL)
- return ((oslThreadIdentifier)pThreadImpl->m_ThreadId);
+ return (oslThreadIdentifier)pThreadImpl->m_ThreadId;
else
- return ((oslThreadIdentifier)GetCurrentThreadId());
+ return (oslThreadIdentifier)GetCurrentThreadId();
}
/*****************************************************************************/
@@ -492,7 +492,7 @@ oslThreadKey SAL_CALL osl_createThreadKey(oslThreadKeyCallbackFunction pCallback
AddKeyToList( pTls );
}
- return ((oslThreadKey)pTls);
+ return (oslThreadKey)pTls;
}
/*****************************************************************************/
@@ -519,10 +519,10 @@ void* SAL_CALL osl_getThreadKeyData(oslThreadKey Key)
{
PTLS pTls = (PTLS)Key;
- return (TlsGetValue( pTls->dwIndex ));
+ return TlsGetValue( pTls->dwIndex );
}
- return (NULL);
+ return NULL;
}
/*****************************************************************************/
@@ -547,7 +547,7 @@ sal_Bool SAL_CALL osl_setThreadKeyData(oslThreadKey Key, void *pData)
return (sal_Bool)(fSuccess != FALSE);
}
- return (sal_False);
+ return sal_False;
}
/*****************************************************************************/
diff --git a/sal/osl/w32/time.c b/sal/osl/w32/time.c
index dd30c44da4e1..90d659a8cca0 100644
--- a/sal/osl/w32/time.c
+++ b/sal/osl/w32/time.c
@@ -56,7 +56,7 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal)
pTimeVal->Seconds = (unsigned long) (Value / 10000000L);
pTimeVal->Nanosec = (unsigned long)((Value % 10000000L) * 100);
- return (sal_True);
+ return sal_True;
}
// osl_getDateTimeFromTimeValue