diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2012-07-25 20:03:22 +0200 |
---|---|---|
committer | Arnaud Versini <arnaud.versini@gmail.com> | 2012-07-27 20:19:13 +0200 |
commit | d6c284e4b146a44ba69a96836c59a98d077bb934 (patch) | |
tree | 13f4f278cd9642eadcbadbc84581573aafb28c58 /sal/osl | |
parent | 5dbbe223c8586bd653685d27c664aa8395632e4a (diff) |
Use memset and memcpy insteadof rtl_zeroMemory and rtl_copyMemory in sal
Change-Id: I4f9649ca61c988d425b59e41549d1c46bb808f2c
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/w32/pipe.c | 8 | ||||
-rw-r--r-- | sal/osl/w32/procimpl.cxx | 3 |
2 files changed, 7 insertions, 4 deletions
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 <string.h> + #include "system.h" #include <osl/pipe.h> @@ -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 <vector> #include <algorithm> #include <string> +#include <string.h> //################################################# 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<void*>(&environment[pos]), reinterpret_cast<const void*>(envv.getStr()), n * sizeof(sal_Unicode)); |