summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/tempfile.cxx7
-rw-r--r--sal/osl/w32/tempfile.cxx3
2 files changed, 7 insertions, 3 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);
}
/*****************************************************************
diff --git a/sal/osl/w32/tempfile.cxx b/sal/osl/w32/tempfile.cxx
index ec50b7ec115d..d69491324931 100644
--- a/sal/osl/w32/tempfile.cxx
+++ b/sal/osl/w32/tempfile.cxx
@@ -32,6 +32,7 @@
#include <malloc.h>
#include <tchar.h>
+#include <cassert>
// Allocate n number of t's on the stack return a pointer to it in p
#define STACK_ALLOC(p, t, n) __try {(p) = static_cast<t*>(_alloca((n)*sizeof(t)));} \
@@ -116,7 +117,7 @@ static bool osl_win32_CreateFile_impl_(
DWORD flags = FILE_ATTRIBUTE_NORMAL;
HANDLE hFile;
- OSL_ASSERT(p_handle);
+ assert(p_handle);
if (b_delete_on_close)
flags |= FILE_FLAG_DELETE_ON_CLOSE;