summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-09-30 15:05:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-04 06:51:29 +0000
commit974b7fe6dfa8935a2068365e416b8d886f9d2a32 (patch)
tree2e7c05cc5f67f691098bb871f26374271e3e6370 /sal/rtl
parent480f6916eff8636fbf6b980a604c6e19a099df08 (diff)
clang-cl loplugin: sal
Change-Id: If04d3f07dc8bffac8887773b5424c09848cd8f1a Reviewed-on: https://gerrit.libreoffice.org/29404 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/alloc_arena.cxx6
-rw-r--r--sal/rtl/alloc_cache.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index 654cd2f1dbfa..234a3d5c6755 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -1100,7 +1100,7 @@ SAL_CALL rtl_arena_free (
#if defined(SAL_UNX)
#include <sys/mman.h>
#elif defined(SAL_W32)
-#define MAP_FAILED 0
+#define MAP_FAILED nullptr
#endif /* SAL_UNX || SAL_W32 */
namespace
@@ -1144,7 +1144,7 @@ SAL_CALL rtl_machdep_alloc (
#if defined(SAL_UNX)
addr = mmap (nullptr, (size_t)(size), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
#elif defined(SAL_W32)
- addr = VirtualAlloc (NULL, (SIZE_T)(size), MEM_COMMIT, PAGE_READWRITE);
+ addr = VirtualAlloc (nullptr, (SIZE_T)(size), MEM_COMMIT, PAGE_READWRITE);
#endif /* (SAL_UNX || SAL_W32) */
if (addr != MAP_FAILED)
@@ -1177,7 +1177,7 @@ SAL_CALL rtl_machdep_free (
#if defined(SAL_UNX)
(void) munmap(pAddr, nSize);
#elif defined(SAL_W32)
- (void) VirtualFree ((LPVOID)(pAddr), (SIZE_T)(0), MEM_RELEASE);
+ (void) VirtualFree (pAddr, (SIZE_T)(0), MEM_RELEASE);
#endif /* (SAL_UNX || SAL_W32) */
}
diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx
index 8540d913bba0..d91908879c70 100644
--- a/sal/rtl/alloc_cache.cxx
+++ b/sal/rtl/alloc_cache.cxx
@@ -1370,10 +1370,10 @@ rtl_cache_wsupdate_init()
RTL_MEMORY_LOCK_ACQUIRE(&(g_cache_list.m_lock));
g_cache_list.m_update_done = 0;
- g_cache_list.m_update_cond = CreateEvent (0, TRUE, FALSE, 0);
+ g_cache_list.m_update_cond = CreateEvent (nullptr, TRUE, FALSE, nullptr);
g_cache_list.m_update_thread =
- CreateThread (NULL, 0, rtl_cache_wsupdate_all, (LPVOID)(10), 0, &dwThreadId);
+ CreateThread (nullptr, 0, rtl_cache_wsupdate_all, reinterpret_cast<LPVOID>(10), 0, &dwThreadId);
RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock));
}