summaryrefslogtreecommitdiff
path: root/sal/osl/unx/tempfile.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-07-05 12:58:10 +1000
committerMichael Meeks <michael.meeks@collabora.com>2017-07-06 15:50:03 +0200
commit4b7b93be530dd5b7924588fbc5855c6fd057984c (patch)
treef0e1e7bfd70a5b5b142ff915ea8ef270401532b4 /sal/osl/unx/tempfile.cxx
parentf396f02dd02ef0e921060240bd19d3ad87813bf5 (diff)
tdf#43157 - osl: convert OSL_ASSERT in unx & w32 tempfile.cxx
Change-Id: I243a5dc4061844af95eae83347ddb15ea7134c0c Reviewed-on: https://gerrit.libreoffice.org/39542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sal/osl/unx/tempfile.cxx')
-rw-r--r--sal/osl/unx/tempfile.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx
index 4894fa43154a..5ba94ded4daa 100644
--- a/sal/osl/unx/tempfile.cxx
+++ b/sal/osl/unx/tempfile.cxx
@@ -32,6 +32,8 @@
#include "file_url.hxx"
#include "file_impl.hxx"
+#include <cassert>
+
oslFileError SAL_CALL osl_getTempDirURL( rtl_uString** pustrTempDir )
{
oslFileError error;
@@ -49,7 +51,7 @@ oslFileError SAL_CALL osl_getTempDirURL( rtl_uString** pustrTempDir )
pValue = "/tmp";
rtl_string2UString( &ustrTempPath, pValue, strlen( pValue ), osl_getThreadTextEncoding(), OSTRING_TO_OUSTRING_CVTFLAGS );
- OSL_ASSERT(ustrTempPath != nullptr);
+ assert(ustrTempPath);
error = osl_getFileURLFromSystemPath( ustrTempPath, pustrTempDir );
rtl_uString_release( ustrTempPath );
@@ -97,7 +99,8 @@ static void osl_gen_random_name_impl_(rtl_uString** rand_name)
RAND_NAME_LENGTH,
RTL_TEXTENCODING_ASCII_US,
OSTRING_TO_OUSTRING_CVTFLAGS);
- OSL_ASSERT(*rand_name != nullptr);
+
+ assert(*rand_name);
}
/*****************************************************************