sal/osl/unx/profile.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit 2d9cf432f683cea56ff3dcb7298098b026eed2d7 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Nov 21 11:59:55 2014 +0100 cid#1255386: Unchecked return value Change-Id: Id55f27a3e1a35d1c5ebeccdd9a853f661b5c1746 diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index 6c54f6a..088a261 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -135,11 +135,13 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o oslProfile SAL_CALL osl_openProfile(rtl_uString *ustrProfileName, oslProfileOption Options) { char profilePath[PATH_MAX] = ""; - - if ( ustrProfileName != 0 && ustrProfileName->buffer[0] != 0 ) - FileURLToPath( profilePath, PATH_MAX, ustrProfileName ); - - return osl_psz_openProfile( profilePath,Options ); + return + (ustrProfileName == nullptr + || ustrProfileName->buffer[0] == 0 + || (FileURLToPath(profilePath, PATH_MAX, ustrProfileName) + == osl_File_E_None)) + ? osl_psz_openProfile(profilePath, Options) + : nullptr; } static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, oslProfileOption Flags) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits