diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-30 17:10:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-31 08:43:18 +0100 |
commit | 0b413caadfbe68b278ca5ba33b6d204687586ea9 (patch) | |
tree | 5eef1cc6046e0081b15b5643f83b92711fb761ef /sal/osl/unx/file_url.cxx | |
parent | e64baee9194f2bd3b7ad5e67fcab1102433fec9b (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/osl/unx/file_url.cxx')
-rw-r--r-- | sal/osl/unx/file_url.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
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); |