summaryrefslogtreecommitdiff
path: root/desktop/source/pkgchk
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-20 16:14:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-21 15:41:50 +0200
commit2a612907aef4c9987f906c6b98aa9b400f58f617 (patch)
tree6170f363054cabb1cd33af9208145827b22c83a1 /desktop/source/pkgchk
parent3a481dde031ba416ec4ef0351130e26e49417418 (diff)
loplugin:flatten in connectivity..desktop
Change-Id: Iff59d3049ba40b4338ef8eec67d08a96b0834d2b Reviewed-on: https://gerrit.libreoffice.org/42578 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/pkgchk')
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx10
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx7
2 files changed, 5 insertions, 12 deletions
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index ee1729fb7604..a928a7e3c336 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -475,16 +475,12 @@ extern "C" int unopkg_main()
}
}
- if (extension.is())
- {
- allExtensions.push_back(extension);
- vecUnaccepted.push_back(bUnacceptedLic);
- }
-
- else
+ if (!extension.is())
throw lang::IllegalArgumentException(
"There is no such extension deployed: " +
cmdPackage,nullptr,-1);
+ allExtensions.push_back(extension);
+ vecUnaccepted.push_back(bUnacceptedLic);
}
}
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 774e30fae122..0aafe484a21d 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -198,15 +198,12 @@ OUString makeAbsoluteFileUrl(
oslFileError rc = osl_getFileURLFromSystemPath( sys_path.pData, &file_url.pData );
if ( rc != osl_File_E_None) {
OUString tempPath;
- if ( osl_getSystemPathFromFileURL( sys_path.pData, &tempPath.pData) == osl_File_E_None )
- {
- file_url = sys_path;
- }
- else
+ if ( osl_getSystemPathFromFileURL( sys_path.pData, &tempPath.pData) != osl_File_E_None )
{
throw RuntimeException("cannot get file url from system path: " +
sys_path );
}
+ file_url = sys_path;
}
OUString abs;