[Libreoffice-commits] core.git: sal/osl
Caolán McNamara
caolanm at redhat.com
Mon May 15 10:37:18 UTC 2017
sal/osl/unx/file_url.cxx | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
New commits:
commit 514ccf73068b6e3b976304752451653a0d179e87
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon May 15 10:37:56 2017 +0100
coverity#1408971 Mixing enum types
Change-Id: I30c46f2bd8a0ae059722f60a3103e5c7883d6a2d
Reviewed-on: https://gerrit.libreoffice.org/37630
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx
index 8b4eb69c752a..6e80f9778515 100644
--- a/sal/osl/unx/file_url.cxx
+++ b/sal/osl/unx/file_url.cxx
@@ -590,21 +590,18 @@ oslFileError osl_getAbsoluteFileURL(
else if (relUrl.startsWith("/"))
relUrl = "file://" + relUrl;
- FileBase::RC rc;
rtl::OUString unresolved_path;
- rc = FileBase::getSystemPathFromFileURL(relUrl, unresolved_path);
-
- if (rc != FileBase::E_None)
- return oslFileError(rc);
+ FileBase::RC frc = FileBase::getSystemPathFromFileURL(relUrl, unresolved_path);
+ if (frc != FileBase::E_None)
+ return oslFileError(frc);
if (systemPathIsRelativePath(unresolved_path))
{
rtl::OUString base_path;
- rc = (FileBase::RC) osl_getSystemPathFromFileURL_Ex(ustrBaseDirURL, &base_path.pData);
-
- if (rc != FileBase::E_None)
- return oslFileError(rc);
+ oslFileError rc = osl_getSystemPathFromFileURL_Ex(ustrBaseDirURL, &base_path.pData);
+ if (rc != osl_File_E_None)
+ return rc;
rtl::OUString abs_path;
systemPathMakeAbsolutePath(base_path, unresolved_path, abs_path);
@@ -613,14 +610,14 @@ oslFileError osl_getAbsoluteFileURL(
}
rtl::OUString resolved_path;
- rc = (FileBase::RC) osl_getAbsoluteFileURL_impl_(unresolved_path, resolved_path);
- if (rc == FileBase::E_None)
+ oslFileError rc = osl_getAbsoluteFileURL_impl_(unresolved_path, resolved_path);
+ if (rc == osl_File_E_None)
{
- rc = (FileBase::RC) osl_getFileURLFromSystemPath(resolved_path.pData, pustrAbsoluteURL);
- OSL_ASSERT(FileBase::E_None == rc);
+ rc = osl_getFileURLFromSystemPath(resolved_path.pData, pustrAbsoluteURL);
+ OSL_ASSERT(osl_File_E_None == rc);
}
- return oslFileError(rc);
+ return rc;
}
namespace osl {
More information about the Libreoffice-commits
mailing list