diff options
Diffstat (limited to 'sal/osl/unx')
-rw-r--r-- | sal/osl/unx/file.cxx | 52 | ||||
-rw-r--r-- | sal/osl/unx/file_volume.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/interlck.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/pipe.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/process.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 20 | ||||
-rw-r--r-- | sal/osl/unx/profile.cxx | 58 | ||||
-rw-r--r-- | sal/osl/unx/signal.cxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/socket.cxx | 44 | ||||
-rw-r--r-- | sal/osl/unx/system.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/thread.cxx | 26 |
11 files changed, 110 insertions, 110 deletions
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) |