diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-23 16:34:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-24 09:24:53 +0100 |
commit | dc4d6c59631c6a197a95e1b531babc6169c95907 (patch) | |
tree | edc07a0e8ceb6c482d3a947bad6ac2bfd7256088 /filter | |
parent | 5802eb3a61a413a0d3f7155d36940b1c7a18011e (diff) |
coverity#704231 Logically dead code
Change-Id: Ic54f25f40416401be3a95880fe1bdc4496be935c
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/placeware/tempfile.cxx | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/filter/source/placeware/tempfile.cxx b/filter/source/placeware/tempfile.cxx index 3f0aeba52f95..3b925523e5b2 100644 --- a/filter/source/placeware/tempfile.cxx +++ b/filter/source/placeware/tempfile.cxx @@ -33,25 +33,24 @@ oslFileError SAL_CALL my_getTempDirURL( rtl_uString** pustrTempDir ) if ( !pValue ) { pValue = getenv( "TMP" ); -#if defined(SOLARIS) || defined (LINUX) if ( !pValue ) + { +#if defined(SOLARIS) || defined (LINUX) pValue = P_tmpdir; +#else + return osl_File_E_NOENT #endif + } } - if ( pValue ) - { - oslFileError error; - rtl_uString *ustrTempPath = NULL; + oslFileError error; + rtl_uString *ustrTempPath = NULL; - rtl_string2UString( &ustrTempPath, pValue, strlen( pValue ), osl_getThreadTextEncoding(), OSTRING_TO_OUSTRING_CVTFLAGS ); - error = osl_getFileURLFromSystemPath( ustrTempPath, pustrTempDir ); - rtl_uString_release( ustrTempPath ); + rtl_string2UString( &ustrTempPath, pValue, strlen( pValue ), osl_getThreadTextEncoding(), OSTRING_TO_OUSTRING_CVTFLAGS ); + error = osl_getFileURLFromSystemPath( ustrTempPath, pustrTempDir ); + rtl_uString_release( ustrTempPath ); - return error; - } - else - return osl_File_E_NOENT; + return error; } #else |