diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-11 13:20:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-02-23 09:26:58 +0200 |
commit | ba233e87efddf0a6751b35784dca1c805364ff3b (patch) | |
tree | 9d7c8a4256e688c2d47cb6ecf580ac196c4da2c0 /sal | |
parent | a2fa9e2468aa5c4fd4b610c5d0ebc8959e87a072 (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')
35 files changed, 286 insertions, 286 deletions
diff --git a/sal/cpprt/operators_new_delete.cxx b/sal/cpprt/operators_new_delete.cxx index e74cafedffb8..c03d8bda9830 100644 --- a/sal/cpprt/operators_new_delete.cxx +++ b/sal/cpprt/operators_new_delete.cxx @@ -128,7 +128,7 @@ static void* allocate_nothrow ( } catch (std::bad_alloc const &) { - return (0); + return 0; } } diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index dff8579cb76f..4d60a6c41ce7 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -303,28 +303,28 @@ oslFileError FileHandle_Impl::setSize (sal_uInt64 uSize) if (uSize <= getSize()) { /* Failure upon 'shrink'. Return original result */ - return (result); + return result; } /* Save current position */ off_t const nCurPos = (off_t)lseek (m_fd, (off_t)0, SEEK_CUR); if (nCurPos == (off_t)(-1)) - return (result); + return result; /* Try 'expand' via 'lseek()' and 'write()' */ if (-1 == lseek (m_fd, (off_t)(nSize - 1), SEEK_SET)) - return (result); + return result; if (-1 == write (m_fd, (char*)"", (size_t)1)) { /* Failure. Restore saved position */ (void) lseek (m_fd, (off_t)(nCurPos), SEEK_SET); - return (result); + return result; } /* Success. Restore saved position */ if (-1 == lseek (m_fd, (off_t)nCurPos, SEEK_SET)) - return (result); + return result; } SAL_INFO("sal.file", "osl_setFileSize(" << m_fd << ", " << getSize() << ") => " << nSize); @@ -437,7 +437,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) @@ -446,7 +446,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; *pBytesRead += uDone; return osl_File_E_None; @@ -456,7 +456,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 = uDone; } if (bufpos >= m_buflen) @@ -507,7 +507,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) @@ -516,7 +516,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; @@ -528,7 +528,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 = uDone; } @@ -558,13 +558,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 = uDone; } @@ -587,7 +587,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; } @@ -598,7 +598,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 = uDone; } @@ -644,7 +644,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; @@ -653,7 +653,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) @@ -694,12 +694,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; } oslFileHandle osl::detail::createFileHandleFromFD( int fd ) @@ -729,7 +729,7 @@ oslFileHandle osl::detail::createFileHandleFromFD( int fd ) } SAL_INFO("sal.file", "osl::detail::createFileHandleFromFD(" << pImpl->m_fd << ", writeable) => " << pImpl->m_strFilePath); - return (oslFileHandle)(pImpl); + return (oslFileHandle)pImpl; } static int osl_file_adjustLockFlags (const char * path, int flags) @@ -1066,7 +1066,7 @@ SAL_CALL osl_closeFile( oslFileHandle Handle ) (void) pthread_mutex_unlock (&(pImpl->m_mutex)); delete pImpl; - return (result); + return result; } oslFileError @@ -1085,7 +1085,7 @@ SAL_CALL osl_syncFile(oslFileHandle Handle) SAL_INFO("sal.file", "osl_syncFile(" << pImpl->m_fd << ")"); oslFileError result = pImpl->syncFile(); if (result != osl_File_E_None) - return (result); + return result; if (-1 == fsync (pImpl->m_fd)) return oslTranslateFileError (OSL_FET_ERROR, errno); @@ -1249,7 +1249,7 @@ SAL_CALL osl_readLine ( pImpl->m_fileptr, ppSequence, &uBytesRead); if (result == osl_File_E_None) pImpl->m_fileptr += uBytesRead; - return (result); + return result; } oslFileError @@ -1275,7 +1275,7 @@ SAL_CALL osl_readFile ( pImpl->m_fileptr, pBuffer, nBytesRequested, pBytesRead); if (result == osl_File_E_None) pImpl->m_fileptr += *pBytesRead; - return (result); + return result; } oslFileError @@ -1303,7 +1303,7 @@ SAL_CALL osl_writeFile ( pImpl->m_fileptr, pBuffer, nBytesToWrite, pBytesWritten); if (result == osl_File_E_None) pImpl->m_fileptr += *pBytesWritten; - return (result); + return result; } oslFileError @@ -1467,7 +1467,7 @@ SAL_CALL osl_setFileSize( oslFileHandle Handle, sal_uInt64 uSize ) 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/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index 012ec37f8d6a..ae480b6274f8 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -232,7 +232,7 @@ static oslFileError osl_psz_getVolumeInformation ( if ((__OSL_STATFS(pszDirectory, &sfs)) < 0) { oslFileError result = oslTranslateFileError(OSL_FET_ERROR, errno); - return (result); + return result; } /* FIXME: how to detect the kind of storage (fixed, cdrom, ...) */ diff --git a/sal/osl/unx/interlck.cxx b/sal/osl/unx/interlck.cxx index 01e8da4ebbaf..28ba48eee90a 100644 --- a/sal/osl/unx/interlck.cxx +++ b/sal/osl/unx/interlck.cxx @@ -84,7 +84,7 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* Count = ++(*pCount); pthread_mutex_unlock(&InterLock); - return (Count); + return Count; } oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* pCount) @@ -95,7 +95,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* Count = --(*pCount); pthread_mutex_unlock(&InterLock); - return (Count); + return Count; } #endif /* default */ diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index f4833f363d26..9815a8236f41 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -299,7 +299,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions return NULL; } - return (pPipe); + return pPipe; } else { /* osl_pipe_OPEN */ @@ -307,7 +307,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions { if ( connect( pPipe->m_Socket, reinterpret_cast<sockaddr *>(&addr), len) >= 0 ) { - return (pPipe); + return pPipe; } SAL_WARN("sal.osl.pipe", "connect() failed: " << strerror(errno)); diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index ea60b2b27049..d9b4d9567801 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -758,7 +758,7 @@ oslProcess SAL_CALL osl_getProcess(oslProcessIdentifier Ident) else pProcImpl = NULL; - return (pProcImpl); + return pProcImpl; } void SAL_CALL osl_freeProcessHandle(oslProcess Process) diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index 3dc743a992e9..1462d15df48d 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -79,7 +79,7 @@ oslProcessError SAL_CALL bootstrap_getExecutableFile(rtl_uString ** ppFileURL) } } - return (result); + return result; } } @@ -111,7 +111,7 @@ oslProcessError SAL_CALL bootstrap_getExecutableFile(rtl_uString ** ppFileURL) } } - return (result); + return result; } } @@ -168,7 +168,7 @@ sal_uInt32 SAL_CALL osl_getCommandArgCount (void) result = g_command_args.m_nCount - 1; pthread_mutex_unlock (&(g_command_args.m_mutex)); - return (result); + return result; } /*************************************** @@ -187,7 +187,7 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 nArg, rtl_uString ** strC } pthread_mutex_unlock (&(g_command_args.m_mutex)); - return (result); + return result; } /*************************************** @@ -280,7 +280,7 @@ oslProcessError SAL_CALL osl_getEnvironment(rtl_uString* pustrEnvVar, rtl_uStrin rtl_string_release(pstr_env_var); } - return (result); + return result; } /*************************************** @@ -336,7 +336,7 @@ oslProcessError SAL_CALL osl_setEnvironment(rtl_uString* pustrEnvVar, rtl_uStrin if (pstr_env_var != 0) rtl_string_release(pstr_env_var); - return (result); + return result; } /*************************************** @@ -383,7 +383,7 @@ oslProcessError SAL_CALL osl_clearEnvironment(rtl_uString* pustrEnvVar) rtl_string_release(pstr_env_var); } - return (result); + return result; } /*************************************** @@ -412,7 +412,7 @@ oslProcessError SAL_CALL osl_getProcessWorkingDir(rtl_uString **ppustrWorkingDir } } - return (result); + return result; } /****************************************************************************** @@ -451,7 +451,7 @@ oslProcessError SAL_CALL osl_getProcessLocale( rtl_Locale ** ppLocale ) pthread_mutex_unlock (&(g_process_locale.m_mutex)); } - return (result); + return result; } /********************************************** @@ -471,7 +471,7 @@ oslProcessError SAL_CALL osl_setProcessLocale( rtl_Locale * pLocale ) } pthread_mutex_unlock (&(g_process_locale.m_mutex)); - return (result); + return result; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index e2d559a1de26..9ca76445f78f 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -152,7 +152,7 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o if ( ( pFile = openFileImpl(pszProfileName, Flags ) ) == NULL ) { - return (NULL); + return NULL; } pProfile = (osl_TProfileImpl*)calloc(1, sizeof(osl_TProfileImpl)); @@ -181,7 +181,7 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o if (pProfile->m_pFile == NULL) closeFileImpl(pFile,pProfile->m_Flags); - return (pProfile); + return pProfile; } sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile) @@ -277,7 +277,7 @@ sal_Bool SAL_CALL osl_closeProfile(oslProfile Profile) free(pProfile); - return (sal_True); + return sal_True; } sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile) @@ -383,7 +383,7 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return (sal_False); + return sal_False; } if (! (pProfile->m_Flags & osl_Profile_SYSTEM)) @@ -426,7 +426,7 @@ sal_Bool SAL_CALL osl_readProfileString(oslProfile Profile, pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return (sal_True); + return sal_True; } sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile, @@ -450,7 +450,7 @@ sal_Bool SAL_CALL osl_readProfileBool(oslProfile Profile, Default = sal_False; } - return (Default); + return Default; } sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile, @@ -478,7 +478,7 @@ sal_uInt32 SAL_CALL osl_readProfileIdent(oslProfile Profile, } } - return (Default); + return Default; } sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, @@ -518,7 +518,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return (sal_False); + return sal_False; } Line = (sal_Char*) malloc(strlen(pszEntry)+strlen(pszString)+48); @@ -544,7 +544,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); free(Line); - return (sal_False); + return sal_False; } pSec = &pProfile->m_Sections[pProfile->m_NoSections - 1]; @@ -572,7 +572,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); free(Line); - return (sal_False); + return sal_False; } pProfile->m_Flags |= FLG_MODIFIED; @@ -670,7 +670,7 @@ sal_Bool SAL_CALL osl_removeProfileEntry(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return (sal_False); + return sal_False; } if (! (pProfile->m_Flags & osl_Profile_SYSTEM)) @@ -742,7 +742,7 @@ sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return (0); + return 0; } if (! (pProfile->m_Flags & osl_Profile_SYSTEM)) @@ -789,7 +789,7 @@ sal_uInt32 SAL_CALL osl_getProfileSectionEntries(oslProfile Profile, pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return (n); + return n; } sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, @@ -824,7 +824,7 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, { pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return (0); + return 0; } if (! (pProfile->m_Flags & osl_Profile_SYSTEM)) @@ -865,7 +865,7 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, pthread_mutex_unlock(&(pTmpProfile->m_AccessLock)); - return (n); + return n; } static osl_TStamp OslProfile_getFileStamp(osl_TFile* pFile) @@ -874,10 +874,10 @@ static osl_TStamp OslProfile_getFileStamp(osl_TFile* pFile) if ( (pFile->m_Handle < 0) || (fstat(pFile->m_Handle, &status) < 0) ) { - return (0); + return 0; } - return (status.st_mtime); + return status.st_mtime; } static bool OslProfile_lockFile(const osl_TFile* pFile, osl_TLockMode eMode) @@ -971,7 +971,7 @@ static osl_TFile* openFileImpl(const sal_Char* pszFilename, oslProfileOption Pro ((pFile->m_Handle = open(pszFilename, O_RDWR)) < 0)) { free(pFile); - return (NULL); + return NULL; } } @@ -994,7 +994,7 @@ static osl_TFile* openFileImpl(const sal_Char* pszFilename, oslProfileOption Pro OslProfile_lockFile(pFile, bWriteable ? write_lock : read_lock); } - return (pFile); + return pFile; } static osl_TStamp closeFileImpl(osl_TFile* pFile, oslProfileOption Flags) @@ -1026,7 +1026,7 @@ static osl_TStamp closeFileImpl(osl_TFile* pFile, oslProfileOption Flags) free(pFile); - return(stamp); + return stamp; } static bool OslProfile_rewindFile(osl_TFile* pFile, bool bTruncate) @@ -1196,7 +1196,7 @@ static sal_Char* stripBlanks(sal_Char* String, sal_uInt32* pLen) while ( (*String == ' ') || (*String == '\t') ) String++; - return (String); + return String; } static sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line) @@ -1227,7 +1227,7 @@ static sal_Char* addLine(osl_TProfileImpl* pProfile, const sal_Char* Line) { pProfile->m_NoLines = 0; pProfile->m_MaxLines = 0; - return (NULL); + return NULL; } if ( pProfile->m_Lines[pProfile->m_NoLines] != 0 ) @@ -1236,7 +1236,7 @@ static 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 sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Line, sal_uInt32 LineNo) @@ -1264,7 +1264,7 @@ static sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Line, sa { pProfile->m_NoLines = 0; pProfile->m_MaxLines = 0; - return (NULL); + return NULL; } } @@ -1295,7 +1295,7 @@ static sal_Char* insertLine(osl_TProfileImpl* pProfile, const sal_Char* Line, sa 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) @@ -1540,7 +1540,7 @@ static osl_TProfileSection* findEntry(osl_TProfileImpl* pProfile, else pSec = NULL; - return (pSec); + return pSec; } static bool loadProfile(osl_TFile* pFile, osl_TProfileImpl* pProfile) @@ -1831,13 +1831,13 @@ static osl_TProfileImpl* acquireProfile(oslProfile Profile, 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 bool releaseProfile(osl_TProfileImpl* pProfile) @@ -1849,7 +1849,7 @@ static bool releaseProfile(osl_TProfileImpl* pProfile) if (pProfile->m_Flags & FLG_AUTOOPEN) { - return (osl_closeProfile((oslProfile)pProfile)); + return osl_closeProfile((oslProfile)pProfile); } else { diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx index f0c7ad999408..49ce7f7515f2 100644 --- a/sal/osl/unx/signal.cxx +++ b/sal/osl/unx/signal.cxx @@ -500,7 +500,7 @@ oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction Handler, return (pHandler); } - return (NULL); + return NULL; } sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler Handler) @@ -532,7 +532,7 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler Handler) free(pHandler); - return (sal_True); + return sal_True; } pPrevious = pHandler; @@ -541,7 +541,7 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler Handler) osl_releaseMutex(SignalListMutex); - return (sal_False); + return sal_False; } oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 UserSignal, void* UserData) diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index c8186864e5cd..efa389544f70 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -558,7 +558,7 @@ sal_Bool SAL_CALL osl_isEqualSocketAddr ( if (pAddr1 == pAddr2) { - return (sal_True); + return sal_True; } if (pAddr1->sa_family == pAddr2->sa_family) @@ -573,7 +573,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 sal_True; } default: @@ -583,7 +583,7 @@ sal_Bool SAL_CALL osl_isEqualSocketAddr ( } } - return (sal_False); + return sal_False; } oslSocketAddr SAL_CALL osl_createInetBroadcastAddr ( @@ -628,7 +628,7 @@ oslSocketAddr SAL_CALL osl_createInetBroadcastAddr ( else { /* No broadcast in class D */ - return ((oslSocketAddr)NULL); + return (oslSocketAddr)NULL; } nAddr = htonl(nAddr); } @@ -785,21 +785,21 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he) sal_Char *cn; if ((he == NULL) || (he->h_name == NULL) || (he->h_addr_list[0] == NULL)) - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; if (_osl_isFullQualifiedDomainName(he->h_name)) { cn= strdup(he->h_name); OSL_ASSERT(cn); if (cn == NULL) - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; } else { cn =_osl_getFullQualifiedDomainName (he->h_name); OSL_ASSERT(cn); if (cn == NULL) - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; } pSockAddr = __osl_createSocketAddr(); @@ -807,7 +807,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he) if (pSockAddr == NULL) { free(cn); - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; } pSockAddr->m_sockaddr.sa_family= he->h_addrtype; @@ -829,7 +829,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he) __osl_destroySocketAddr( pSockAddr ); free (cn); - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; } pAddr= (oslHostAddr) malloc(sizeof(struct oslHostAddrImpl)); @@ -838,7 +838,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he) { __osl_destroySocketAddr( pSockAddr ); free (cn); - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; } pAddr->pHostName= cn; @@ -884,19 +884,19 @@ oslHostAddr SAL_CALL osl_psz_createHostAddr ( OSL_ASSERT(pszHostname && pAddr); if ((pszHostname == NULL) || (pAddr == NULL)) - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; cn = strdup(pszHostname); OSL_ASSERT(cn); if (cn == NULL) - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; pHostAddr= (oslHostAddr) malloc(sizeof(struct oslHostAddrImpl)); OSL_ASSERT(pHostAddr); if (pHostAddr == NULL) { free (cn); - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; } pHostAddr->pHostName= cn; @@ -951,7 +951,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByAddr (const oslSocketAddr pAddr) OSL_ASSERT(pAddr); if (pAddr == NULL) - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; if (pAddr->m_sockaddr.sa_family == FAMILY_TO_NATIVE(osl_Socket_FamilyInet)) { @@ -959,7 +959,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByAddr (const oslSocketAddr pAddr) struct hostent *he; if (sin->sin_addr.s_addr == htonl(INADDR_ANY)) - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; char const * addr = reinterpret_cast<char const *>(&sin->sin_addr); // at least some Androids apparently have a gethostbyaddr with char* @@ -970,7 +970,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByAddr (const oslSocketAddr pAddr) return _osl_hostentToHostAddr (he); } - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; } oslHostAddr SAL_CALL osl_copyHostAddr (const oslHostAddr pAddr) @@ -980,7 +980,7 @@ oslHostAddr SAL_CALL osl_copyHostAddr (const oslHostAddr pAddr) if (pAddr) return osl_psz_createHostAddr (pAddr->pHostName, pAddr->pSockAddr); else - return ((oslHostAddr)NULL); + return (oslHostAddr)NULL; } void SAL_CALL osl_getHostnameOfHostAddr ( @@ -1009,7 +1009,7 @@ oslSocketAddr SAL_CALL osl_getSocketAddrOfHostAddr (const oslHostAddr pAddr) OSL_ASSERT(pAddr); if (pAddr) - return ((oslSocketAddr)(pAddr->pSockAddr)); + return (oslSocketAddr)pAddr->pSockAddr; else return NULL; } @@ -1129,10 +1129,10 @@ oslSocketAddr SAL_CALL osl_psz_resolveHostname(const sal_Char* pszHostname) osl_destroyHostAddr(pAddr); - return (SockAddr); + return SockAddr; } - return ((oslSocketAddr)NULL); + return (oslSocketAddr)NULL; } sal_Int32 SAL_CALL osl_getServicePort(rtl_uString *ustrServicename, rtl_uString *ustrProtocol) @@ -1459,12 +1459,12 @@ oslSocketAddr SAL_CALL osl_getLocalAddrOfSocket(oslSocket pSocket) oslSocketAddr pAddr; if (pSocket == NULL) /* ENOTSOCK */ - return ((oslSocketAddr)NULL); + return (oslSocketAddr)NULL; AddrLen= sizeof(struct sockaddr); if (getsockname(pSocket->m_Socket, &Addr, &AddrLen) == OSL_SOCKET_ERROR) - return ((oslSocketAddr)NULL); + return (oslSocketAddr)NULL; pAddr = __osl_createSocketAddrFromSystem( &Addr ); return pAddr; diff --git a/sal/osl/unx/system.cxx b/sal/osl/unx/system.cxx index cddfd75b019d..847a575a0e3c 100644 --- a/sal/osl/unx/system.cxx +++ b/sal/osl/unx/system.cxx @@ -288,7 +288,7 @@ char *fcvt(double value, int ndigit, int *decpt, int *sign) strcpy(ret,buf); } - return(ret); + return ret; } #endif diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx index 0ca411383c27..a0c0cc4e3743 100644 --- a/sal/osl/unx/thread.cxx +++ b/sal/osl/unx/thread.cxx @@ -155,7 +155,7 @@ Thread_Impl* osl_thread_construct_Impl (void) pthread_mutex_init (&(pImpl->m_Lock), PTHREAD_MUTEXATTR_DEFAULT); pthread_cond_init (&(pImpl->m_Cond), PTHREAD_CONDATTR_DEFAULT); } - return (pImpl); + return pImpl; } static void osl_thread_destruct_Impl (Thread_Impl ** ppImpl) @@ -246,7 +246,7 @@ static void* osl_thread_start_Impl (void* pData) } osl_thread_cleanup_Impl (pImpl); - return (0); + return 0; } static oslThread osl_thread_create_Impl ( @@ -263,7 +263,7 @@ static oslThread osl_thread_create_Impl ( pImpl = osl_thread_construct_Impl(); if (!pImpl) - return (0); /* ENOMEM */ + return 0; /* ENOMEM */ pImpl->m_WorkerFunction = pWorker; pImpl->m_pData = pThreadData; @@ -273,7 +273,7 @@ static oslThread osl_thread_create_Impl ( #if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS) if (pthread_attr_init(&attr) != 0) - return (0); + return 0; #if defined OPENBSD stacksize = 262144; @@ -284,7 +284,7 @@ static oslThread osl_thread_create_Impl ( #endif if (pthread_attr_setstacksize(&attr, stacksize) != 0) { pthread_attr_destroy(&attr); - return (0); + return 0; } #endif @@ -306,7 +306,7 @@ static oslThread osl_thread_create_Impl ( pthread_mutex_unlock (&(pImpl->m_Lock)); osl_thread_destruct_Impl (&pImpl); - return (0); + return 0; } #if defined OPENBSD || ((defined MACOSX || defined LINUX) && !ENABLE_RUNTIME_OPTIMIZATIONS) @@ -322,7 +322,7 @@ static oslThread osl_thread_create_Impl ( pthread_mutex_unlock (&(pImpl->m_Lock)); - return ((oslThread)(pImpl)); + return (oslThread)pImpl; } oslThread osl_createThread ( @@ -422,7 +422,7 @@ sal_Bool SAL_CALL osl_isThreadRunning(const oslThread Thread) active = ((pImpl->m_Flags & THREADIMPL_FLAGS_ACTIVE) > 0); pthread_mutex_unlock (&(pImpl->m_Lock)); - return (active); + return active; } void SAL_CALL osl_joinWithThread(oslThread Thread) @@ -579,14 +579,14 @@ static sal_uInt16 lookupThreadId (pthread_t hThread) if (pthread_equal(pEntry->Handle, hThread)) { pthread_mutex_unlock(&HashLock); - return (pEntry->Ident); + return pEntry->Ident; } pEntry = pEntry->Next; } pthread_mutex_unlock(&HashLock); - return (0); + return 0; } static sal_uInt16 insertThreadId (pthread_t hThread) @@ -627,7 +627,7 @@ static sal_uInt16 insertThreadId (pthread_t hThread) pthread_mutex_unlock(&HashLock); - return (pEntry->Ident); + return pEntry->Ident; } static void removeThreadId (pthread_t hThread) @@ -677,7 +677,7 @@ oslThreadIdentifier SAL_CALL osl_getThreadIdentifier(oslThread Thread) Ident = insertThreadId (current); } - return ((oslThreadIdentifier)(Ident)); + return (oslThreadIdentifier)Ident; } /***************************************************************************** @@ -953,7 +953,7 @@ oslThreadKey SAL_CALL osl_createThreadKey( oslThreadKeyCallbackFunction pCallbac } } - return ((oslThreadKey)pKey); + return (oslThreadKey)pKey; } void SAL_CALL osl_destroyThreadKey(oslThreadKey Key) 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 diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index c733ecded529..b7447175039a 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -96,7 +96,7 @@ rtl_arena_segment_constructor (void * obj) QUEUE_START_NAMED(segment, s); QUEUE_START_NAMED(segment, f); - return (1); + return 1; } /** rtl_arena_segment_destructor() @@ -404,7 +404,7 @@ rtl_arena_hash_remove ( } } - return (segment); + return segment; } /* ================================================================= */ @@ -515,14 +515,14 @@ rtl_arena_segment_create ( QUEUE_INSERT_HEAD_NAMED(span, (*ppSegment), s); /* report success */ - return (1); + return 1; } rtl_arena_segment_put (arena, &span); } rtl_arena_segment_put (arena, ppSegment); } } - return (0); + return 0; } /** rtl_arena_segment_coalesce() @@ -709,7 +709,7 @@ rtl_arena_activate ( if (!(arena->m_qcache_ptr)) { /* out of memory */ - return (0); + return 0; } for (i = 1; i <= n; i++) { @@ -724,7 +724,7 @@ rtl_arena_activate ( QUEUE_INSERT_TAIL_NAMED(&(g_arena_list.m_arena_head), arena, arena_); RTL_MEMORY_LOCK_RELEASE(&(g_arena_list.m_lock)); } - return (arena); + return arena; } /** rtl_arena_deactivate() @@ -916,7 +916,7 @@ try_alloc: goto try_alloc; } } - return (result); + return result; } /** rtl_arena_destroy() @@ -1003,7 +1003,7 @@ SAL_CALL rtl_arena_alloc ( (*pSize) = size; } } - return (addr); + return addr; } /** rtl_arena_free() @@ -1151,9 +1151,9 @@ SAL_CALL rtl_machdep_alloc ( pArena->m_stats.m_mem_alloc += size; (*pSize) = size; - return (addr); + return addr; } - return (NULL); + return NULL; } /** rtl_machdep_free() @@ -1183,14 +1183,14 @@ rtl_machdep_pagesize() { #if defined(SAL_UNX) #if defined(FREEBSD) || defined(NETBSD) || defined(DRAGONFLY) - return ((sal_Size)getpagesize()); + return (sal_Size)getpagesize(); #else /* POSIX */ - return ((sal_Size)sysconf(_SC_PAGESIZE)); + return (sal_Size)sysconf(_SC_PAGESIZE); #endif /* xBSD || POSIX */ #elif defined(SAL_W32) SYSTEM_INFO info; GetSystemInfo (&info); - return ((sal_Size)(info.dwPageSize)); + return (sal_Size)info.dwPageSize; #endif /* (SAL_UNX || SAL_W32) */ } diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index e85f7520ea16..d63ae65dbb42 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -171,7 +171,7 @@ rtl_cache_hash_insert ( bufctl->m_next = (*ppHead); (*ppHead) = bufctl; - return (bufctl->m_addr); + return bufctl->m_addr; } /** rtl_cache_hash_remove() @@ -221,7 +221,7 @@ rtl_cache_hash_remove ( } } - return (bufctl); + return bufctl; } /* ================================================================= */ @@ -241,7 +241,7 @@ rtl_cache_slab_constructor (void * obj, SAL_UNUSED_PARAMETER void *) QUEUE_START_NAMED(slab, slab_); slab->m_ntypes = 0; - return (1); + return 1; } /** rtl_cache_slab_destructor() @@ -299,7 +299,7 @@ rtl_cache_slab_create ( rtl_arena_free (cache->m_source, addr, size); } } - return (slab); + return slab; } /** rtl_cache_slab_destroy() @@ -418,7 +418,7 @@ rtl_cache_slab_alloc ( { /* out of memory */ RTL_MEMORY_LOCK_RELEASE(&(cache->m_slab_lock)); - return (0); + return 0; } bufctl->m_addr = slab->m_bp; @@ -463,7 +463,7 @@ rtl_cache_slab_alloc ( } RTL_MEMORY_LOCK_RELEASE(&(cache->m_slab_lock)); - return (addr); + return addr; } /** rtl_cache_slab_free() @@ -547,7 +547,7 @@ rtl_cache_magazine_constructor (void * obj, SAL_UNUSED_PARAMETER void *) mag->m_mag_size = RTL_CACHE_MAGAZINE_SIZE; mag->m_mag_used = 0; - return (1); + return 1; } /** rtl_cache_magazine_destructor() @@ -632,7 +632,7 @@ rtl_cache_depot_dequeue ( depot->m_curr_min = depot->m_mag_count; } } - return (mag); + return mag; } /** rtl_cache_depot_exchange_alloc() @@ -659,7 +659,7 @@ rtl_cache_depot_exchange_alloc ( assert((full == 0) || (full->m_mag_used > 0)); - return (full); + return full; } /** rtl_cache_depot_exchange_free() @@ -686,7 +686,7 @@ rtl_cache_depot_exchange_free ( assert((empty == 0) || (empty->m_mag_used == 0)); - return (empty); + return empty; } /** rtl_cache_depot_populate() @@ -742,7 +742,7 @@ rtl_cache_constructor (void * obj) /* depot layer */ (void)RTL_MEMORY_LOCK_INIT(&(cache->m_depot_lock)); - return (1); + return 1; } /** rtl_cache_destructor() @@ -1102,7 +1102,7 @@ try_alloc: goto try_alloc; } } - return (result); + return result; } /** rtl_cache_destroy() @@ -1129,7 +1129,7 @@ SAL_CALL rtl_cache_alloc ( void * obj = 0; if (cache == 0) - return (0); + return 0; if (alloc_mode == AMode_SYSTEM) { @@ -1507,7 +1507,7 @@ rtl_cache_wsupdate_all (void * arg) } RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock)); - return (0); + return 0; } /* ================================================================= * diff --git a/sal/rtl/alloc_global.cxx b/sal/rtl/alloc_global.cxx index a18527106f24..cff293c97083 100644 --- a/sal/rtl/alloc_global.cxx +++ b/sal/rtl/alloc_global.cxx @@ -129,7 +129,7 @@ try_alloc: } } } - return (p); + return p; } /* ================================================================= */ @@ -175,7 +175,7 @@ void * SAL_CALL rtl_reallocateMemory_CUSTOM (void * p, sal_Size n) SAL_THROW_EXT { rtl_freeMemory (p), p = 0; } - return (p); + return p; } #endif @@ -365,7 +365,7 @@ void * SAL_CALL rtl_allocateZeroMemory (sal_Size n) SAL_THROW_EXTERN_C() void * p = rtl_allocateMemory (n); if (p != 0) memset (p, 0, n); - return (p); + return p; } /* ================================================================= */ diff --git a/sal/rtl/alloc_impl.hxx b/sal/rtl/alloc_impl.hxx index 57ababe7de79..05ec242889a7 100644 --- a/sal/rtl/alloc_impl.hxx +++ b/sal/rtl/alloc_impl.hxx @@ -71,7 +71,7 @@ highbit(sal_Size n) int k = 1; if (n == 0) - return (0); + return 0; #if SAL_TYPES_SIZEOFLONG == 8 if (n & 0xffffffff00000000ul) k |= 32, n >>= 32; @@ -87,7 +87,7 @@ highbit(sal_Size n) if (n & 0x02) k++; - return (k); + return k; } /** lowbit(): find first bit set @@ -99,7 +99,7 @@ lowbit(sal_Size n) int k = 1; if (n == 0) - return (0); + return 0; #if SAL_TYPES_SIZEOFLONG == 8 if (!(n & 0xffffffff)) k |= 32, n >>= 32; @@ -114,7 +114,7 @@ lowbit(sal_Size n) k |= 2, n >>= 2; if (!(n & 0x1)) k++; - return (k); + return k; } /** Queue manipulation macros diff --git a/sal/rtl/cmdargs.cxx b/sal/rtl/cmdargs.cxx index f2d103fb48a8..ef9f9bde2ae3 100644 --- a/sal/rtl/cmdargs.cxx +++ b/sal/rtl/cmdargs.cxx @@ -88,7 +88,7 @@ oslProcessError SAL_CALL rtl_getAppCommandArg ( rtl_uString_assign( ppCommandArg, g_ppCommandArgs[nArg] ); result = osl_Process_E_None; } - return (result); + return result; } sal_uInt32 SAL_CALL rtl_getAppCommandArgCount() diff --git a/sal/rtl/digest.cxx b/sal/rtl/digest.cxx index 205db64f76b4..d8321fa9cada 100644 --- a/sal/rtl/digest.cxx +++ b/sal/rtl/digest.cxx @@ -382,7 +382,7 @@ rtlDigestError SAL_CALL rtl_digest_MD2 ( result = rtl_digest_getMD2 (&digest, pBuffer, nBufLen); memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -397,7 +397,7 @@ rtlDigest SAL_CALL rtl_digest_createMD2() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_MD2; __rtl_digest_initMD2 (&(pImpl->m_context)); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -753,7 +753,7 @@ rtlDigestError SAL_CALL rtl_digest_MD5 ( result = rtl_digest_getMD5 (&digest, pBuffer, nBufLen); memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -768,7 +768,7 @@ rtlDigest SAL_CALL rtl_digest_createMD5() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_MD5; __rtl_digest_initMD5 (&(pImpl->m_context)); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -1237,7 +1237,7 @@ rtlDigestError SAL_CALL rtl_digest_SHA ( result = rtl_digest_getSHA (&digest, pBuffer, nBufLen); memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -1252,7 +1252,7 @@ rtlDigest SAL_CALL rtl_digest_createSHA() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_SHA_0; __rtl_digest_initSHA (&(pImpl->m_context), __rtl_digest_updateSHA_0); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -1427,7 +1427,7 @@ rtlDigestError SAL_CALL rtl_digest_SHA1 ( result = rtl_digest_getSHA1 (&digest, pBuffer, nBufLen); memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -1442,7 +1442,7 @@ rtlDigest SAL_CALL rtl_digest_createSHA1() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_SHA_1; __rtl_digest_initSHA (&(pImpl->m_context), __rtl_digest_updateSHA_1); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -1670,7 +1670,7 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_MD5 ( } memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -1685,7 +1685,7 @@ rtlDigest SAL_CALL rtl_digest_createHMAC_MD5() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_HMAC_MD5; __rtl_digest_initHMAC_MD5 (&(pImpl->m_context)); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* @@ -1902,7 +1902,7 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_SHA1 ( } memset (&digest, 0, sizeof (digest)); - return (result); + return result; } /* @@ -1917,7 +1917,7 @@ rtlDigest SAL_CALL rtl_digest_createHMAC_SHA1() SAL_THROW_EXTERN_C() pImpl->m_digest = __rtl_digest_HMAC_SHA1; __rtl_digest_initHMAC_SHA1 (&(pImpl->m_context)); } - return ((rtlDigest)pImpl); + return (rtlDigest)pImpl; } /* diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx index 851dbffb1dda..912074eb789f 100644 --- a/sal/rtl/random.cxx +++ b/sal/rtl/random.cxx @@ -102,7 +102,7 @@ static double __rtl_random_data (RandomData_Impl *pImpl) ((double)(pImpl->m_nZ) / 30307.0) ); random -= ((double)((sal_uInt32)(random))); - return (random); + return random; } /* @@ -278,7 +278,7 @@ rtlRandomPool SAL_CALL rtl_random_createPool() SAL_THROW_EXTERN_C() pImpl = (RandomPool_Impl*)NULL; } } - return ((rtlRandomPool)pImpl); + return (rtlRandomPool)pImpl; } /* diff --git a/sal/workben/getlocaleinfotest.cxx b/sal/workben/getlocaleinfotest.cxx index d1f3db5328f7..b9bd0343fe14 100644 --- a/sal/workben/getlocaleinfotest.cxx +++ b/sal/workben/getlocaleinfotest.cxx @@ -33,7 +33,7 @@ int _cdecl main( int argc, char * argv[] ) if ( rtlLocale ) rtlTextEnc = osl_getTextEncodingFromLocale( rtlLocale ); - return(0); + return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/workben/t_digest.c b/sal/workben/t_digest.c index 499c7e927539..2372206950d3 100644 --- a/sal/workben/t_digest.c +++ b/sal/workben/t_digest.c @@ -151,7 +151,7 @@ static char *pt (unsigned char *md, int length) for (i=0; i<length; i++) sprintf(&(buf[i*2]),"%02x",md[i]); - return(buf); + return buf; } int SAL_CALL main (void) @@ -360,7 +360,7 @@ int SAL_CALL main (void) else printf("test (PBKDF2) %d ok\n", 1); - return (err); + return err; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/workben/t_ojp_exe.cxx b/sal/workben/t_ojp_exe.cxx index a0ea3ab67231..558ff3e722a1 100644 --- a/sal/workben/t_ojp_exe.cxx +++ b/sal/workben/t_ojp_exe.cxx @@ -38,7 +38,7 @@ int main(int argc, char* argv[]) printf("osl process test executable ended:\n"); - return (0); + return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/workben/t_random.c b/sal/workben/t_random.c index dd06f38d4902..d0d73441dfe8 100644 --- a/sal/workben/t_random.c +++ b/sal/workben/t_random.c @@ -30,7 +30,7 @@ static char *pt (unsigned char *md, int length) for (i=0; i<length; i++) sprintf(&(buf[i*2]),"%02x",md[i]); - return(buf); + return buf; } /* @@ -48,7 +48,7 @@ int SAL_CALL main (void) printf ("random: %s\n", pt (buffer, 8)); } rtl_random_destroyPool (pool); - return(0); + return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/workben/t_readline.c b/sal/workben/t_readline.c index 309881497c54..c824f10a9abf 100644 --- a/sal/workben/t_readline.c +++ b/sal/workben/t_readline.c @@ -41,7 +41,7 @@ int main (int argc, char ** argv) result = osl_getFileURLFromSystemPath (pSystemPath, &pFileUrl); rtl_uString_release (pSystemPath), pSystemPath = 0; if (result != osl_File_E_None) - return (result); + return result; result = osl_openFile (pFileUrl, &hFile, osl_File_OpenFlag_Read); rtl_uString_release (pFileUrl), pFileUrl = 0; diff --git a/sal/workben/test.cxx b/sal/workben/test.cxx index de7fc035358e..0d04bece1686 100644 --- a/sal/workben/test.cxx +++ b/sal/workben/test.cxx @@ -49,7 +49,7 @@ int _cdecl main( int argc, char * argv[] ) void test_uuid(); test_uuid(); - return(0); + return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |