From d6c284e4b146a44ba69a96836c59a98d077bb934 Mon Sep 17 00:00:00 2001 From: Arnaud Versini Date: Wed, 25 Jul 2012 20:03:22 +0200 Subject: Use memset and memcpy insteadof rtl_zeroMemory and rtl_copyMemory in sal Change-Id: I4f9649ca61c988d425b59e41549d1c46bb808f2c --- sal/osl/w32/pipe.c | 8 +++++--- sal/osl/w32/procimpl.cxx | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'sal/osl') diff --git a/sal/osl/w32/pipe.c b/sal/osl/w32/pipe.c index 0532f82d1057..e02692362028 100644 --- a/sal/osl/w32/pipe.c +++ b/sal/osl/w32/pipe.c @@ -26,6 +26,8 @@ * ************************************************************************/ +#include + #include "system.h" #include @@ -314,7 +316,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe) OSL_ASSERT(pPipe); OSL_ASSERT(pPipe->m_File != INVALID_HANDLE_VALUE); - rtl_zeroMemory(&os, sizeof(OVERLAPPED)); + memset(&os, 0, sizeof(OVERLAPPED)); os.hEvent = pPipe->m_AcceptEvent; ResetEvent(pPipe->m_AcceptEvent); @@ -389,7 +391,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe, OSL_ASSERT(pPipe); - rtl_zeroMemory(&os,sizeof(OVERLAPPED)); + memset(&os, 0, sizeof(OVERLAPPED)); os.hEvent = pPipe->m_ReadEvent; ResetEvent(pPipe->m_ReadEvent); @@ -428,7 +430,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe, OSL_ASSERT(pPipe); - rtl_zeroMemory(&os, sizeof(OVERLAPPED)); + memset(&os, 0, sizeof(OVERLAPPED)); os.hEvent = pPipe->m_WriteEvent; ResetEvent(pPipe->m_WriteEvent); diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx index 9dc0959b7742..2b7d6ba6b066 100644 --- a/sal/osl/w32/procimpl.cxx +++ b/sal/osl/w32/procimpl.cxx @@ -53,6 +53,7 @@ #include #include #include +#include //################################################# extern "C" oslFileHandle SAL_CALL osl_createFileHandleFromOSHandle( HANDLE hFile, sal_uInt32 uFlags ); @@ -218,7 +219,7 @@ namespace /* private */ OSL_ASSERT(envv.getLength()); sal_uInt32 n = envv.getLength() + 1; // copy the final '\0', too - rtl_copyMemory( + memcpy( reinterpret_cast(&environment[pos]), reinterpret_cast(envv.getStr()), n * sizeof(sal_Unicode)); -- cgit v1.2.3