From: Hermès Bélusca-Maïto Date: Sun, 4 Feb 2018 16:21:58 +0000 (+0100) Subject: [STOBJECT] Don't hardcode variable type in sizeof. X-Git-Tag: 0.4.9-dev~108^2~1 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=4207397963f4adaa3c19104e075646a9c3b956e2 [STOBJECT] Don't hardcode variable type in sizeof. --- diff --git a/dll/shellext/stobject/csystray.cpp b/dll/shellext/stobject/csystray.cpp index 89bd5c5ac03..d1e51c116e6 100644 --- a/dll/shellext/stobject/csystray.cpp +++ b/dll/shellext/stobject/csystray.cpp @@ -125,7 +125,7 @@ HRESULT CSysTray::NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWO TRACE("NotifyIcon code=%d, uId=%d, hIcon=%p, szTip=%S\n", code, uId, hIcon, szTip); - nim.cbSize = sizeof(NOTIFYICONDATA); + nim.cbSize = sizeof(nim); nim.uFlags = NIF_MESSAGE | NIF_ICON | NIF_STATE | NIF_TIP; nim.hIcon = hIcon; nim.uID = uId; diff --git a/dll/shellext/stobject/hotplug.cpp b/dll/shellext/stobject/hotplug.cpp index 5c6d3099a80..9af5eef972a 100644 --- a/dll/shellext/stobject/hotplug.cpp +++ b/dll/shellext/stobject/hotplug.cpp @@ -101,7 +101,8 @@ HRESULT EnumHotpluggedDevices(CSimpleArray &devList) HRESULT NotifyBalloon(CSysTray* pSysTray, LPCWSTR szTitle = NULL, LPCWSTR szInfo = NULL, UINT uId = ID_ICON_HOTPLUG) { NOTIFYICONDATA nim = { 0 }; - nim.cbSize = sizeof(NOTIFYICONDATA); + + nim.cbSize = sizeof(nim); nim.uID = uId; nim.hWnd = pSysTray->GetHWnd();