[Libreoffice-commits] core.git: sal/osl

Stephan Bergmann sbergman at redhat.com
Thu Nov 2 09:47:44 UTC 2017


 sal/osl/unx/file_error_transl.cxx |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit bcb5a3121d089c059b0293c4402c3617bbe3d131
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Nov 2 10:46:24 2017 +0100

    coverity#1420539: dead code
    
    ...after 0b413caadfbe68b278ca5ba33b6d204687586ea9 "loplugin:constantparam in
    sal,sax"
    
    Change-Id: Idf000bd1e0a261eac9ec0afbd2fb6f4c4ef8c7dc

diff --git a/sal/osl/unx/file_error_transl.cxx b/sal/osl/unx/file_error_transl.cxx
index 2ebebe006889..4dfa11883352 100644
--- a/sal/osl/unx/file_error_transl.cxx
+++ b/sal/osl/unx/file_error_transl.cxx
@@ -27,16 +27,12 @@ oslFileError oslTranslateFileError(int Errno)
 
     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 (Errno == 0)
-        return osl_error;
-
     switch(Errno)
     {
         case 0:
-            osl_error = osl_File_E_None;
-            break;
+            /* Have a look at file_error_transl.hxx for
+               the reason that we do this here */
+            return osl_error;
 
         case EPERM:
             osl_error = osl_File_E_PERM;


More information about the Libreoffice-commits mailing list