summaryrefslogtreecommitdiff
path: root/store/workben
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2012-09-29 14:47:11 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-10-01 18:48:05 +0000
commit36a2db3722b79ed3df075d7f3fa77fb761bcf5a4 (patch)
tree838cdec72aeea68c3ad78f8d18535afd5408d43a /store/workben
parent053b68a0c7b75eae7d86d4465f65abc6046515ee (diff)
Replace usage of rtl_*Memory with equivalent from string.h
Change-Id: I50ffc10f007f03c3252ef0196b59b881429cc159 Reviewed-on: https://gerrit.libreoffice.org/734 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'store/workben')
-rw-r--r--store/workben/t_base.cxx12
-rw-r--r--store/workben/t_file.cxx7
2 files changed, 10 insertions, 9 deletions
diff --git a/store/workben/t_base.cxx b/store/workben/t_base.cxx
index ffb1e066cc8a..e60db8970121 100644
--- a/store/workben/t_base.cxx
+++ b/store/workben/t_base.cxx
@@ -18,10 +18,10 @@
*/
+#include <string.h>
#include "sal/types.h"
#include "osl/diagnose.h"
#include "osl/thread.h"
-#include "rtl/memory.h"
#include "rtl/ustring.hxx"
#include "object.hxx"
@@ -242,15 +242,15 @@ static void __store_testUnicode (const sal_Char *pszFilename)
hConvert = rtl_createTextToUnicodeConverter (RTL_TEXTENCODING_UTF8);
MyFindData it;
- rtl_zeroMemory (&it, sizeof(it));
+ memset (&it, 0, sizeof(it));
sal_Int32 n = rtl_str_getLength (pszFilename);
n = __store_convertTextToUnicode (
hConvert, pszFilename, n,
it.m_pszName, STORE_MAXIMUM_NAMESIZE - 1);
if (it.m_nLength > n)
- rtl_zeroMemory (
- &it.m_pszName[n], ((it.m_nLength - n) * sizeof(sal_Unicode)));
+ memset (
+ &it.m_pszName[n], 0, ((it.m_nLength - n) * sizeof(sal_Unicode)));
it.m_nLength = n;
rtl_destroyTextToUnicodeConverter (hConvert);
@@ -340,8 +340,8 @@ int SAL_CALL main (int argc, char **argv)
xLockBytes.clear();
sal_Char pBuffer[TEST_PAGESIZE];
- rtl_zeroMemory (pBuffer, sizeof (pBuffer));
- rtl_copyMemory (pBuffer, argv[0], rtl_str_getLength(argv[0]) + 1);
+ memset (pBuffer, 0, sizeof (pBuffer));
+ memcpy (pBuffer, argv[0], rtl_str_getLength(argv[0]) + 1);
eErrCode = xBIOS->write (TEST_PAGESIZE, pBuffer, sizeof (pBuffer));
if (eErrCode != store_E_None)
diff --git a/store/workben/t_file.cxx b/store/workben/t_file.cxx
index 745fbbd978e9..058d04b3577a 100644
--- a/store/workben/t_file.cxx
+++ b/store/workben/t_file.cxx
@@ -24,6 +24,7 @@
#include "lockbyte.hxx"
+#include <string.h>
#include <stdio.h>
#include "osl/file.h"
@@ -91,7 +92,7 @@ int SAL_CALL main (int argc, char **argv)
}
sal_Char buffer[TEST_PAGESIZE];
- rtl_fillMemory (buffer, sizeof(buffer), sal_uInt8('B'));
+ memset (buffer, sal_uInt8('B'), sizeof(buffer));
sal_uInt32 i, k;
for (k = 0; k < 4; k++)
@@ -173,14 +174,14 @@ int SAL_CALL main (int argc, char **argv)
if (offset == 0)
{
sal_uInt32 magic = 256 * 4;
- if (rtl_compareMemory (&verify[index], &magic, sizeof(magic)))
+ if (memcmp (&verify[index], &magic, sizeof(magic)))
{
// Failure.
fprintf (stderr, "t_file: Unexpected value at 0x00000000\n");
}
index += 4;
}
- if (rtl_compareMemory (
+ if (memcmp (
&verify[index], &buffer[index], TEST_PAGESIZE - index))
{
// Failure.