summaryrefslogtreecommitdiff
path: root/plugins/AutoShutdown
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AutoShutdown')
-rw-r--r--plugins/AutoShutdown/src/frame.cpp6
-rw-r--r--plugins/AutoShutdown/src/shutdownsvc.cpp4
-rw-r--r--plugins/AutoShutdown/src/utils.cpp6
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp
index b77aba262b..d53134bc50 100644
--- a/plugins/AutoShutdown/src/frame.cpp
+++ b/plugins/AutoShutdown/src/frame.cpp
@@ -49,7 +49,7 @@ static COLORREF GetDefaultColor(BYTE id)
static LOGFONT* GetDefaultFont(LOGFONT *lf)
{
NONCLIENTMETRICS ncm;
- ZeroMemory(&ncm,sizeof(ncm));
+ memset(&ncm, 0, sizeof(ncm));
ncm.cbSize=sizeof(ncm);
if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS,ncm.cbSize,&ncm,0)) {
*lf=ncm.lfStatusFont;
@@ -193,7 +193,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA
NULL);
if (dat->hwndToolTip != NULL) {
SetWindowPos(dat->hwndToolTip,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
- ZeroMemory(&ti,sizeof(ti));
+ memset(&ti, 0, sizeof(ti));
ti.cbSize=sizeof(ti);
ti.hwnd=hwndFrame;
ti.uFlags=TTF_IDISHWND|TTF_SUBCLASS|TTF_TRANSPARENT;
@@ -603,7 +603,7 @@ static int FrameModulesLoaded(WPARAM wParam,LPARAM lParam)
int InitFrame(void)
{
WNDCLASSEX wcx;
- ZeroMemory(&wcx,sizeof(wcx));
+ memset(&wcx, 0, sizeof(wcx));
wcx.cbSize =sizeof(wcx);
wcx.style =CS_DBLCLKS|CS_PARENTDC;
wcx.lpfnWndProc =FrameWndProc;
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp
index 7f1ab8b818..fa4d2e576e 100644
--- a/plugins/AutoShutdown/src/shutdownsvc.cpp
+++ b/plugins/AutoShutdown/src/shutdownsvc.cpp
@@ -185,7 +185,7 @@ static DWORD ShutdownNow(BYTE shutdownType)
dwErrCode=ERROR_NOT_ENOUGH_MEMORY;
if (paConn != NULL) {
for(dwRetries=5; dwRetries != 0; dwRetries--) { /* prevent infinite loop (rare) */
- ZeroMemory(paConn, dwConnSize);
+ memset(paConn, 0, dwConnSize);
paConn[0].dwSize = sizeof(RASCONN);
dwErrCode = RasEnumConnections(paConn, &dwConnSize, &dwConnItems);
if (dwErrCode != ERROR_BUFFER_TOO_SMALL) break;
@@ -211,7 +211,7 @@ static DWORD ShutdownNow(BYTE shutdownType)
}
/* RAS does not allow to quit directly after HangUp (see docs) */
dwLastTickCount = GetTickCount();
- ZeroMemory(&rcs,sizeof(RASCONNSTATUS));
+ memset(&rcs, 0, sizeof(RASCONNSTATUS));
rcs.dwSize = sizeof(RASCONNSTATUS);
for(dw=0; dw < dwConnItems; ++dw) {
if (paConn[dw].hrasconn != NULL) {
diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp
index 5c537fa06c..7eeab7d78f 100644
--- a/plugins/AutoShutdown/src/utils.cpp
+++ b/plugins/AutoShutdown/src/utils.cpp
@@ -207,7 +207,7 @@ BOOL GetFormatedDateTime(TCHAR *pszOut,int nSize,time_t timestamp,BOOL fShowDate
int FontService_RegisterFont(const char *pszDbModule,const char *pszDbName,const TCHAR *pszSection,const TCHAR *pszDescription,const TCHAR* pszBackgroundGroup,const TCHAR* pszBackgroundName,int position,BOOL bAllowEffects,LOGFONT *plfDefault,COLORREF clrDefault)
{
FontIDT fid;
- ZeroMemory(&fid,sizeof(fid));
+ memset(&fid, 0, sizeof(fid));
fid.cbSize=sizeof(fid);
mir_strncpy(fid.dbSettingsGroup,pszDbModule,sizeof(fid.dbSettingsGroup)); /* buffer safe */
mir_strncpy(fid.prefix,pszDbName,sizeof(fid.prefix)); /* buffer safe */
@@ -246,7 +246,7 @@ int FontService_GetFont(const TCHAR *pszSection,const TCHAR *pszDescription,COLO
int FontService_RegisterColor(const char *pszDbModule,const char *pszDbName,const TCHAR *pszSection,const TCHAR *pszDescription,COLORREF clrDefault)
{
ColourIDT cid;
- ZeroMemory(&cid,sizeof(cid));
+ memset(&cid, 0, sizeof(cid));
cid.cbSize=sizeof(cid);
cid.defcolour=clrDefault;
mir_strncpy(cid.dbSettingsGroup,pszDbModule,sizeof(cid.dbSettingsGroup)); /* buffer safe */
@@ -260,7 +260,7 @@ int FontService_RegisterColor(const char *pszDbModule,const char *pszDbName,cons
int FontService_GetColor(const TCHAR *pszSection,const TCHAR *pszDescription,COLORREF *pclr)
{
ColourIDT cid;
- ZeroMemory(&cid,sizeof(cid));
+ memset(&cid, 0, sizeof(cid));
cid.cbSize=sizeof(cid);
mir_tstrncpy(cid.group,pszSection,sizeof(cid.group)); /* buffer safe */
mir_tstrncpy(cid.name,pszDescription,sizeof(cid.name)); /* buffer safe */