summaryrefslogtreecommitdiff
path: root/sal/osl/w32/file.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-10-15 01:57:12 +0300
committerStephan Bergmann <sbergman@redhat.com>2019-10-17 09:53:42 +0200
commitd51db77c8d87f210785a8a8c6dd875f7bacddb3c (patch)
treefd1ab208d49e85371fc9bb321539ce137bdaf719 /sal/osl/w32/file.cxx
parentc8eaadb5d70f42723517bb028f363e37726be256 (diff)
Remove some memset calls
Replace them with default initialization or calloc Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1 Reviewed-on: https://gerrit.libreoffice.org/80805 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/osl/w32/file.cxx')
-rw-r--r--sal/osl/w32/file.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index 7fda6107adeb..1c219f8f00af 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -156,9 +156,7 @@ FileHandle_Impl::FileHandle_Impl(HANDLE hFile)
m_buffer (nullptr)
{
::InitializeCriticalSection (&m_mutex);
- m_buffer = static_cast<sal_uInt8 *>(malloc(m_bufsiz));
- if (m_buffer)
- memset (m_buffer, 0, m_bufsiz);
+ m_buffer = static_cast<sal_uInt8 *>(calloc(m_bufsiz, 1));
}
FileHandle_Impl::~FileHandle_Impl()