summaryrefslogtreecommitdiff
path: root/shell
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 /shell
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 'shell')
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/propspec.cxx1
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/propspec.hxx2
-rw-r--r--shell/source/win32/spsupp/COMOpenDocuments.cxx3
-rw-r--r--shell/source/win32/spsupp/spsuppHelper.cxx3
4 files changed, 3 insertions, 6 deletions
diff --git a/shell/source/win32/shlxthandler/ooofilt/propspec.cxx b/shell/source/win32/shlxthandler/ooofilt/propspec.cxx
index f96d363d6542..bfb924803a1f 100644
--- a/shell/source/win32/shlxthandler/ooofilt/propspec.cxx
+++ b/shell/source/win32/shlxthandler/ooofilt/propspec.cxx
@@ -50,7 +50,6 @@
CFullPropSpec::CFullPropSpec()
{
- memset( &_guidPropSet, 0, sizeof( _guidPropSet ) );
_psProperty.ulKind = PRSPEC_PROPID;
_psProperty.propid = 0;
}
diff --git a/shell/source/win32/shlxthandler/ooofilt/propspec.hxx b/shell/source/win32/shlxthandler/ooofilt/propspec.hxx
index 7004c9c871f5..aa14257d779d 100644
--- a/shell/source/win32/shlxthandler/ooofilt/propspec.hxx
+++ b/shell/source/win32/shlxthandler/ooofilt/propspec.hxx
@@ -74,7 +74,7 @@ public:
inline BOOL IsPropertyName() const;
inline BOOL IsPropertyPropid() const;
private:
- GUID _guidPropSet;
+ GUID _guidPropSet = {};
PROPSPEC _psProperty;
};
// Inline methods for CFullPropSpec
diff --git a/shell/source/win32/spsupp/COMOpenDocuments.cxx b/shell/source/win32/spsupp/COMOpenDocuments.cxx
index 92ad732bfda0..b851f0e5b8b9 100644
--- a/shell/source/win32/spsupp/COMOpenDocuments.cxx
+++ b/shell/source/win32/spsupp/COMOpenDocuments.cxx
@@ -26,8 +26,7 @@ HRESULT LOStart(Args... args)
std::wstring sCmdLine((quote(GetHelperExe()) + ... + (L" " + quote(args))));
LPWSTR pCmdLine = const_cast<LPWSTR>(sCmdLine.c_str());
- STARTUPINFOW si;
- std::memset(&si, 0, sizeof si);
+ STARTUPINFOW si = {};
si.cb = sizeof si;
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOW;
diff --git a/shell/source/win32/spsupp/spsuppHelper.cxx b/shell/source/win32/spsupp/spsuppHelper.cxx
index 57b7c9a8cf86..b60f9dc528da 100644
--- a/shell/source/win32/spsupp/spsuppHelper.cxx
+++ b/shell/source/win32/spsupp/spsuppHelper.cxx
@@ -124,8 +124,7 @@ DWORD LOStart(const wchar_t* sModeArg, const wchar_t* sFilePath)
+ OUString(o3tl::toU(sFilePath)) + "\"";
LPWSTR pCmdLine = const_cast<LPWSTR>(o3tl::toW(sCmdLine.getStr()));
- STARTUPINFOW si;
- std::memset(&si, 0, sizeof si);
+ STARTUPINFOW si = {};
si.cb = sizeof si;
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOW;