From d51db77c8d87f210785a8a8c6dd875f7bacddb3c Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 15 Oct 2019 01:57:12 +0300 Subject: 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 --- embedserv/source/embed/docholder.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'embedserv') diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 1f1f619cd302..96659ca754fb 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -509,8 +509,7 @@ static void CopyToOLEMenu(HMENU hOrig,WORD origPos,HMENU hDest,WORD destPos) InsertMenuW(hDest,destPos,MF_BYPOSITION | MF_POPUP, reinterpret_cast(subMenu),buffer); - MENUITEMINFOW mi; - memset(&mi,0,sizeof(mi)); + MENUITEMINFOW mi = {}; mi.cbSize = sizeof(mi); mi.fMask = MIIM_DATA; if(GetMenuItemInfoW(hOrig,origPos,TRUE,&mi)) @@ -1140,8 +1139,7 @@ HRESULT DocumentHolder::GetExtent( SIZEL *pSize ) HRESULT DocumentHolder::SetContRects(LPCRECT aRect) { if(m_xContainerWindow.is()) { - RECT wi; - memset(&wi,0,sizeof(wi)); + RECT wi = {}; if(m_pIOleIPFrame) { m_pIOleIPFrame->GetBorder(&wi); m_xContainerWindow->setPosSize( @@ -1216,8 +1214,7 @@ css::uno::Reference< css::awt::XWindow> SAL_CALL DocumentHolder::getContainerWin lang::SystemDependent::SYSTEM_WIN32), uno::UNO_QUERY); - RECT wi; - memset(&wi,0,sizeof(wi)); + RECT wi = {}; if(xWin.is() && m_pIOleIPFrame->GetBorder(&wi) == NOERROR) { xWin->setVisible(true); xWin->setPosSize( -- cgit