summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-30 17:10:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 08:43:18 +0100
commit0b413caadfbe68b278ca5ba33b6d204687586ea9 (patch)
tree5eef1cc6046e0081b15b5643f83b92711fb761ef /sal
parente64baee9194f2bd3b7ad5e67fcab1102433fec9b (diff)
loplugin:constantparam in sal,sax
Change-Id: I7ca2fd05d1cf61f9038c529a853e72fedb1c9ed0 Reviewed-on: https://gerrit.libreoffice.org/44087 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx32
-rw-r--r--sal/osl/unx/file_error_transl.cxx6
-rw-r--r--sal/osl/unx/file_error_transl.hxx10
-rw-r--r--sal/osl/unx/file_misc.cxx39
-rw-r--r--sal/osl/unx/file_stat.cxx14
-rw-r--r--sal/osl/unx/file_url.cxx18
-rw-r--r--sal/osl/unx/file_volume.cxx4
7 files changed, 57 insertions, 66 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index b97e157c29be..de36b3d26a9c 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -299,7 +299,7 @@ oslFileError FileHandle_Impl::setSize(sal_uInt64 uSize)
if (ftruncate_with_name(m_fd, nSize, m_strFilePath) == -1)
{
/* Failure. Save original result. Try fallback algorithm */
- oslFileError result = oslTranslateFileError(OSL_FET_ERROR, errno);
+ oslFileError result = oslTranslateFileError(errno);
/* Check against current size. Fail upon 'shrink' */
if (uSize <= getSize())
@@ -379,7 +379,7 @@ oslFileError FileHandle_Impl::readAt(
}
if (nBytes == -1)
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
*pBytesRead = nBytes;
@@ -402,7 +402,7 @@ oslFileError FileHandle_Impl::writeAt(
ssize_t nBytes = ::pwrite(m_fd, pBuffer, nBytesToWrite, nOffset);
if (nBytes == -1)
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
m_size = std::max(m_size, sal::static_int_cast< sal_uInt64 >(nOffset + nBytes));
@@ -422,7 +422,7 @@ oslFileError FileHandle_Impl::readFileAt(
// not seekable (pipe)
ssize_t nBytes = ::read(m_fd, pBuffer, nBytesRequested);
if (nBytes == -1)
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
*pBytesRead = nBytes;
@@ -503,7 +503,7 @@ oslFileError FileHandle_Impl::writeFileAt(
// not seekable (pipe)
ssize_t nBytes = ::write(m_fd, pBuffer, nBytesToWrite);
if (nBytes == -1)
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
*pBytesWritten = nBytes;
@@ -958,7 +958,7 @@ oslFileError openFilePath(const char *cpFilePath, oslFileHandle* pHandle, sal_uI
{
int saved_errno = errno;
SAL_INFO("sal.file", "osl_openFile(" << cpFilePath << ", " << ((flags & O_RDWR) ? "writeable":"readonly") << ") failed: " << strerror(saved_errno));
- return oslTranslateFileError(OSL_FET_ERROR, saved_errno);
+ return oslTranslateFileError(saved_errno);
}
#if !HAVE_FEATURE_MACOSX_SANDBOX
@@ -970,7 +970,7 @@ oslFileError openFilePath(const char *cpFilePath, oslFileHandle* pHandle, sal_uI
{
int saved_errno = errno;
SAL_INFO("sal.file", "osl_openFile(" << cpFilePath << ", " << ((flags & O_RDWR) ? "writeable":"readonly") << "): fcntl(" << fd << ", F_GETFL) failed: " << strerror(saved_errno));
- eRet = oslTranslateFileError(OSL_FET_ERROR, saved_errno);
+ eRet = oslTranslateFileError(saved_errno);
(void) close(fd);
return eRet;
}
@@ -979,7 +979,7 @@ oslFileError openFilePath(const char *cpFilePath, oslFileHandle* pHandle, sal_uI
{
int saved_errno = errno;
SAL_INFO("sal.file", "osl_openFile(" << cpFilePath << ", " << ((flags & O_RDWR) ? "writeable":"readonly") << "): fcntl(" << fd << ", F_SETFL) failed: " << strerror(saved_errno));
- eRet = oslTranslateFileError(OSL_FET_ERROR, saved_errno);
+ eRet = oslTranslateFileError(saved_errno);
(void) close(fd);
return eRet;
}
@@ -992,7 +992,7 @@ oslFileError openFilePath(const char *cpFilePath, oslFileHandle* pHandle, sal_uI
{
int saved_errno = errno;
SAL_INFO("sal.file", "osl_openFile(" << cpFilePath << ", " << ((flags & O_RDWR) ? "writeable":"readonly") << "): fstat(" << fd << ") failed: " << strerror(saved_errno));
- eRet = oslTranslateFileError(OSL_FET_ERROR, saved_errno);
+ eRet = oslTranslateFileError(saved_errno);
(void) close(fd);
return eRet;
}
@@ -1013,7 +1013,7 @@ oslFileError openFilePath(const char *cpFilePath, oslFileHandle* pHandle, sal_uI
/* Mac OSX returns ENOTSUP for webdav drives. We should try read lock */
if ((errno != ENOTSUP) || ((flock(fd, LOCK_SH | LOCK_NB) == 1) && (errno != ENOTSUP)))
{
- eRet = oslTranslateFileError(OSL_FET_ERROR, errno);
+ eRet = oslTranslateFileError(errno);
(void) close(fd);
return eRet;
}
@@ -1030,7 +1030,7 @@ oslFileError openFilePath(const char *cpFilePath, oslFileHandle* pHandle, sal_uI
{
int saved_errno = errno;
SAL_INFO("sal.file", "osl_openFile(" << cpFilePath << ", " << ((flags & O_RDWR) ? "writeable":"readonly") << "): fcntl(" << fd << ", F_SETLK) failed: " << strerror(saved_errno));
- eRet = oslTranslateFileError(OSL_FET_ERROR, saved_errno);
+ eRet = oslTranslateFileError(saved_errno);
(void) close(fd);
return eRet;
}
@@ -1071,7 +1071,7 @@ oslFileError SAL_CALL openFile(rtl_uString* ustrFileURL, oslFileHandle* pHandle,
#ifdef MACOSX
if (macxp_resolveAlias(buffer, sizeof(buffer)) != 0)
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
#endif /* MACOSX */
return openFilePath(buffer, pHandle, uFlags, mode);
@@ -1111,7 +1111,7 @@ oslFileError SAL_CALL osl_closeFile(oslFileHandle Handle)
else if (close(pImpl->m_fd) == -1)
{
/* translate error code */
- result = oslTranslateFileError(OSL_FET_ERROR, errno);
+ result = oslTranslateFileError(errno);
}
(void) pthread_mutex_unlock(&(pImpl->m_mutex));
@@ -1139,7 +1139,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle)
return result;
if (fsync(pImpl->m_fd) == -1)
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
return osl_File_E_None;
}
@@ -1191,7 +1191,7 @@ oslFileError SAL_CALL osl_mapFile(
void* p = mmap(nullptr, nLength, PROT_READ, MAP_SHARED, pImpl->m_fd, nOffset);
if (p == MAP_FAILED)
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
*ppAddr = p;
@@ -1255,7 +1255,7 @@ static oslFileError unmapFile(void* pAddr, sal_uInt64 uLength)
size_t const nLength = sal::static_int_cast< size_t >(uLength);
if (munmap(pAddr, nLength) == -1)
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
return osl_File_E_None;
}
diff --git a/sal/osl/unx/file_error_transl.cxx b/sal/osl/unx/file_error_transl.cxx
index c012e25de04c..2ebebe006889 100644
--- a/sal/osl/unx/file_error_transl.cxx
+++ b/sal/osl/unx/file_error_transl.cxx
@@ -21,15 +21,15 @@
#include "file_error_transl.hxx"
#include <osl/diagnose.h>
-oslFileError oslTranslateFileError(bool bIsError, int Errno)
+oslFileError oslTranslateFileError(int Errno)
{
oslFileError osl_error = osl_File_E_invalidError;
- OSL_ENSURE((bIsError && (0 != Errno)) || (!bIsError && (0 == Errno)), "oslTranslateFileError strange input combination!");
+ OSL_ENSURE(0 != Errno, "oslTranslateFileError strange input combination!");
/* Have a look at file_error_transl.hxx for
the reason that we do this here */
- if (bIsError && (Errno == 0))
+ if (Errno == 0)
return osl_error;
switch(Errno)
diff --git a/sal/osl/unx/file_error_transl.hxx b/sal/osl/unx/file_error_transl.hxx
index 5357db3d28b0..77340f9b0748 100644
--- a/sal/osl/unx/file_error_transl.hxx
+++ b/sal/osl/unx/file_error_transl.hxx
@@ -23,23 +23,15 @@
#include <osl/file.h>
#include <sal/types.h>
-#define OSL_FET_ERROR true
-
/** Translate errno's to osl file errors
- @param [in] bIsError specifies if nErrno should be interpreted as error,
- some libc functions signaling an error but errno is
- nevertheless 0 in this case the function should at
- least return osl_File_E_Unknown but in no case
- osl_File_E_None!
-
@param [in] nErrno the errno if errno is 0 and bIsError is true the
function returns osl_File_E_Unknown
@returns the osl error code appropriate to the errno
*/
-oslFileError oslTranslateFileError(bool bIsError, int Errno);
+oslFileError oslTranslateFileError(int Errno);
#endif
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index 8cb00fcc5a1d..5f7bdc5b010b 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -222,7 +222,7 @@ oslFileError SAL_CALL osl_openDirectory(rtl_uString* ustrDirectoryURL, oslDirect
rtl_uString_release( ustrSystemPath );
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
}
oslFileError SAL_CALL osl_closeDirectory(oslDirectory pDirectory)
@@ -244,7 +244,7 @@ oslFileError SAL_CALL osl_closeDirectory(oslDirectory pDirectory)
#endif
{
if (closedir( pDirImpl->pDirStruct))
- err = oslTranslateFileError(OSL_FET_ERROR, errno);
+ err = oslTranslateFileError(errno);
}
/* cleanup members */
@@ -262,14 +262,13 @@ oslFileError SAL_CALL osl_closeDirectory(oslDirectory pDirectory)
* on request
*********************************************/
-static struct dirent* osl_readdir_impl_(DIR* pdir, bool bFilterLocalAndParentDir)
+static struct dirent* osl_readdir_impl_(DIR* pdir)
{
struct dirent* pdirent;
while ((pdirent = readdir(pdir)) != nullptr)
{
- if (bFilterLocalAndParentDir &&
- ((strcmp(pdirent->d_name, ".") == 0) || (strcmp(pdirent->d_name, "..") == 0)))
+ if ((strcmp(pdirent->d_name, ".") == 0) || (strcmp(pdirent->d_name, "..") == 0))
continue;
break;
}
@@ -299,7 +298,7 @@ oslFileError SAL_CALL osl_getNextDirectoryItem(oslDirectory pDirectory,
else
#endif
{
- pEntry = osl_readdir_impl_(pDirImpl->pDirStruct, true);
+ pEntry = osl_readdir_impl_(pDirImpl->pDirStruct);
}
if (!pEntry)
@@ -361,7 +360,7 @@ oslFileError SAL_CALL osl_getDirectoryItem(rtl_uString* ustrFileURL, oslDirector
if (access_u(ustrSystemPath, F_OK) == -1)
{
- osl_error = oslTranslateFileError(OSL_FET_ERROR, errno);
+ osl_error = oslTranslateFileError(errno);
}
else
{
@@ -414,7 +413,7 @@ oslFileError osl_createDirectoryWithFlags(
#ifdef MACOSX
if ( macxp_resolveAlias( path, PATH_MAX ) != 0 )
- return oslTranslateFileError( OSL_FET_ERROR, errno );
+ return oslTranslateFileError( errno );
#endif/* MACOSX */
return osl_psz_createDirectory( path, flags );
@@ -435,7 +434,7 @@ oslFileError SAL_CALL osl_removeDirectory( rtl_uString* ustrDirectoryURL )
#ifdef MACOSX
if ( macxp_resolveAlias( path, PATH_MAX ) != 0 )
- return oslTranslateFileError( OSL_FET_ERROR, errno );
+ return oslTranslateFileError( errno );
#endif/* MACOSX */
return osl_psz_removeDirectory( path );
@@ -461,7 +460,7 @@ oslFileError osl_psz_createDirectory(char const * pszPath, sal_uInt32 flags)
if ( nRet < 0 )
{
nRet=errno;
- return oslTranslateFileError(OSL_FET_ERROR, nRet);
+ return oslTranslateFileError(nRet);
}
return osl_File_E_None;
@@ -476,7 +475,7 @@ static oslFileError osl_psz_removeDirectory( const sal_Char* pszPath )
if ( nRet < 0 )
{
nRet=errno;
- return oslTranslateFileError(OSL_FET_ERROR, nRet);
+ return oslTranslateFileError(nRet);
}
return osl_File_E_None;
@@ -527,7 +526,7 @@ static oslFileError create_dir_recursively_(
return osl_File_E_None;
if (native_err != ENOENT)
- return oslTranslateFileError(OSL_FET_ERROR, native_err);
+ return oslTranslateFileError(native_err);
// we step back until '/a_dir' at maximum because
// we should get an error unequal ENOENT when
@@ -598,7 +597,7 @@ oslFileError SAL_CALL osl_moveFile( rtl_uString* ustrFileURL, rtl_uString* ustrD
#ifdef MACOSX
if ( macxp_resolveAlias( srcPath, PATH_MAX ) != 0 || macxp_resolveAlias( destPath, PATH_MAX ) != 0 )
- return oslTranslateFileError( OSL_FET_ERROR, errno );
+ return oslTranslateFileError( errno );
#endif/* MACOSX */
return oslDoMoveFile( srcPath, destPath );
@@ -625,7 +624,7 @@ oslFileError SAL_CALL osl_copyFile( rtl_uString* ustrFileURL, rtl_uString* ustrD
#ifdef MACOSX
if ( macxp_resolveAlias( srcPath, PATH_MAX ) != 0 || macxp_resolveAlias( destPath, PATH_MAX ) != 0 )
- return oslTranslateFileError( OSL_FET_ERROR, errno );
+ return oslTranslateFileError( errno );
#endif/* MACOSX */
return osl_psz_copyFile( srcPath, destPath, false );
@@ -645,7 +644,7 @@ oslFileError SAL_CALL osl_removeFile( rtl_uString* ustrFileURL )
#ifdef MACOSX
if ( macxp_resolveAlias( path, PATH_MAX ) != 0 )
- return oslTranslateFileError( OSL_FET_ERROR, errno );
+ return oslTranslateFileError( errno );
#endif/* MACOSX */
return osl_psz_removeFile( path );
@@ -686,7 +685,7 @@ static oslFileError osl_psz_removeFile( const sal_Char* pszPath )
if ( nRet < 0 )
{
nRet=errno;
- return oslTranslateFileError(OSL_FET_ERROR, nRet);
+ return oslTranslateFileError(nRet);
}
if ( S_ISDIR(aStat.st_mode) )
@@ -698,7 +697,7 @@ static oslFileError osl_psz_removeFile( const sal_Char* pszPath )
if ( nRet < 0 )
{
nRet=errno;
- return oslTranslateFileError(OSL_FET_ERROR, nRet);
+ return oslTranslateFileError(nRet);
}
return osl_File_E_None;
@@ -713,7 +712,7 @@ static oslFileError osl_psz_moveFile(const sal_Char* pszPath, const sal_Char* ps
if ( nRet < 0 )
{
nRet=errno;
- return oslTranslateFileError(OSL_FET_ERROR, nRet);
+ return oslTranslateFileError(nRet);
}
return osl_File_E_None;
@@ -738,7 +737,7 @@ static oslFileError osl_psz_copyFile( const sal_Char* pszPath, const sal_Char* p
if ( nRet < 0 )
{
nRet=errno;
- return oslTranslateFileError(OSL_FET_ERROR, nRet);
+ return oslTranslateFileError(nRet);
}
/* mfe: we do only copy files here! */
@@ -848,7 +847,7 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char*
if ( nRet > 0 )
{
- return oslTranslateFileError(OSL_FET_ERROR, nRet);
+ return oslTranslateFileError(nRet);
}
if ( DestFileExists == 1 )
diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx
index 3ea74e80918c..2b960d017fea 100644
--- a/sal/osl/unx/file_stat.cxx
+++ b/sal/osl/unx/file_stat.cxx
@@ -172,7 +172,7 @@ namespace
{
rtl::OUString link_target;
if (!osl::realpath(file_path, link_target))
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
oslFileError osl_error = osl_getFileURLFromSystemPath(link_target.pData, &pStat->ustrLinkTargetURL);
if (osl_error != osl_File_E_None)
@@ -212,7 +212,7 @@ oslFileError SAL_CALL osl_getFileStatus(oslDirectoryItem Item, oslFileStatus* pS
bool bStatNeeded = is_stat_call_necessary(uFieldMask, pImpl->getFileType());
if (bStatNeeded && (osl::lstat(file_path, file_stat) != 0))
- return oslTranslateFileError(OSL_FET_ERROR, errno);
+ return oslTranslateFileError(errno);
if (bStatNeeded)
{
@@ -290,7 +290,7 @@ static oslFileError osl_psz_setFileAttributes( const sal_Char* pszFilePath, sal_
nNewMode|=S_IXOTH;
if (chmod(pszFilePath, nNewMode) < 0)
- osl_error = oslTranslateFileError(OSL_FET_ERROR, errno);
+ osl_error = oslTranslateFileError(errno);
return osl_error;
}
@@ -309,7 +309,7 @@ oslFileError SAL_CALL osl_setFileAttributes( rtl_uString* ustrFileURL, sal_uInt6
#ifdef MACOSX
if ( macxp_resolveAlias( path, PATH_MAX ) != 0 )
- return oslTranslateFileError( OSL_FET_ERROR, errno );
+ return oslTranslateFileError( errno );
#endif/* MACOSX */
return osl_psz_setFileAttributes( path, uAttributes );
@@ -332,7 +332,7 @@ static oslFileError osl_psz_setFileTime (
if ( nRet < 0 )
{
nRet=errno;
- return oslTranslateFileError(OSL_FET_ERROR, nRet);
+ return oslTranslateFileError(nRet);
}
#ifdef DEBUG_OSL_FILE
@@ -389,7 +389,7 @@ static oslFileError osl_psz_setFileTime (
if ( nRet < 0 )
{
nRet=errno;
- return oslTranslateFileError(OSL_FET_ERROR, nRet);
+ return oslTranslateFileError(nRet);
}
return osl_File_E_None;
@@ -413,7 +413,7 @@ oslFileError SAL_CALL osl_setFileTime (
#ifdef MACOSX
if ( macxp_resolveAlias( path, PATH_MAX ) != 0 )
- return oslTranslateFileError( OSL_FET_ERROR, errno );
+ return oslTranslateFileError( errno );
#endif/* MACOSX */
return osl_psz_setFileTime( path, pLastAccessTime, pLastWriteTime );
diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx
index 2041c984ec02..428bfec90e3f 100644
--- a/sal/osl/unx/file_url.cxx
+++ b/sal/osl/unx/file_url.cxx
@@ -429,20 +429,20 @@ namespace
{
char unresolved_path[PATH_MAX];
if (!UnicodeToText(unresolved_path, sizeof(unresolved_path), path, rtl_ustr_getLength(path)))
- return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
+ return oslTranslateFileError(ENAMETOOLONG);
char resolved_path[PATH_MAX];
if (realpath(unresolved_path, resolved_path))
{
if (!TextToUnicode(resolved_path, strlen(resolved_path), path, PATH_MAX))
- return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
+ return oslTranslateFileError(ENAMETOOLONG);
}
else
{
if (EACCES == errno || ENOTDIR == errno || ENOENT == errno)
*failed = true;
else
- ferr = oslTranslateFileError(OSL_FET_ERROR, errno);
+ ferr = oslTranslateFileError(errno);
}
}
@@ -458,7 +458,7 @@ namespace
{
/* the given unresolved path must not exceed PATH_MAX */
if (unresolved_path.getLength() >= (PATH_MAX - 2))
- return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
+ return oslTranslateFileError(ENAMETOOLONG);
sal_Unicode path_resolved_so_far[PATH_MAX];
const sal_Unicode* punresolved = unresolved_path.getStr();
@@ -507,7 +507,7 @@ namespace
/* a file or directory name may start with '.' */
if ((presolvedsf = ustrtoend(path_resolved_so_far)) > sentinel)
- return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
+ return oslTranslateFileError(ENAMETOOLONG);
ustrchrcat(*punresolved++, path_resolved_so_far);
@@ -524,7 +524,7 @@ namespace
else if (*punresolved == '/')
{
if ((presolvedsf = ustrtoend(path_resolved_so_far)) > sentinel)
- return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
+ return oslTranslateFileError(ENAMETOOLONG);
ustrchrcat(*punresolved++, path_resolved_so_far);
@@ -540,7 +540,7 @@ namespace
if (!_islastchr(path_resolved_so_far, '/'))
{
if ((presolvedsf = ustrtoend(path_resolved_so_far)) > sentinel)
- return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
+ return oslTranslateFileError(ENAMETOOLONG);
ustrchrcat('/', path_resolved_so_far);
}
@@ -549,7 +549,7 @@ namespace
else // any other character
{
if ((presolvedsf = ustrtoend(path_resolved_so_far)) > sentinel)
- return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
+ return oslTranslateFileError(ENAMETOOLONG);
ustrchrcat(*punresolved++, path_resolved_so_far);
@@ -713,7 +713,7 @@ oslFileError FileURLToPath(char * buffer, size_t bufLen, rtl_uString* ustrFileUR
/* convert unicode path to text */
if(!UnicodeToText( buffer, bufLen, ustrSystemPath->buffer, ustrSystemPath->length))
- osl_error = oslTranslateFileError(OSL_FET_ERROR, errno);
+ osl_error = oslTranslateFileError(errno);
rtl_uString_release(ustrSystemPath);
diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx
index 5a69039e0a18..5dc41cc0f7ea 100644
--- a/sal/osl/unx/file_volume.cxx
+++ b/sal/osl/unx/file_volume.cxx
@@ -107,7 +107,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI
#ifdef MACOSX
if ( macxp_resolveAlias( path, PATH_MAX ) != 0 )
- return oslTranslateFileError( OSL_FET_ERROR, errno );
+ return oslTranslateFileError( errno );
#endif/* MACOSX */
return osl_psz_getVolumeInformation( path, pInfo, uFieldMask);
@@ -218,7 +218,7 @@ static oslFileError osl_psz_getVolumeInformation (
OSL_detail_STATFS_INIT(sfs);
if ((OSL_detail_STATFS(pszDirectory, &sfs)) < (0))
{
- oslFileError result = oslTranslateFileError(OSL_FET_ERROR, errno);
+ oslFileError result = oslTranslateFileError(errno);
return result;
}