mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 11:13:38 +00:00
taskmgr: Remove ZeroMemory() calls and instead set the relevant fields (usually just iSubItem) to zero manually.
This commit is contained in:
parent
567d1e6e29
commit
e2a1168892
|
@ -86,11 +86,10 @@ static DWORD get_selected_pid(void)
|
|||
|
||||
for (Index = 0; Index < (ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++)
|
||||
{
|
||||
memset(&lvitem, 0, sizeof(LVITEM));
|
||||
|
||||
lvitem.mask = LVIF_STATE;
|
||||
lvitem.stateMask = LVIS_SELECTED;
|
||||
lvitem.iItem = Index;
|
||||
lvitem.iSubItem = 0;
|
||||
|
||||
SendMessage(hProcessPageListCtrl, LVM_GETITEM, 0, (LPARAM) &lvitem);
|
||||
|
||||
|
@ -109,16 +108,16 @@ static int list_channel_CB(HANDLE hProcess, void* addr, struct __wine_debug_
|
|||
{
|
||||
int j;
|
||||
char val[2];
|
||||
LVITEMA lvi;
|
||||
LVITEMA lvitem;
|
||||
int index;
|
||||
HWND hChannelLV = (HWND)user;
|
||||
|
||||
memset(&lvi, 0, sizeof(lvi));
|
||||
lvitem.mask = LVIF_TEXT;
|
||||
lvitem.pszText = channel->name;
|
||||
lvitem.iItem = 0;
|
||||
lvitem.iSubItem = 0;
|
||||
|
||||
lvi.mask = LVIF_TEXT;
|
||||
lvi.pszText = channel->name;
|
||||
|
||||
index = ListView_InsertItem(hChannelLV, &lvi);
|
||||
index = ListView_InsertItem(hChannelLV, &lvitem);
|
||||
if (index == -1) return 0;
|
||||
|
||||
val[1] = '\0';
|
||||
|
|
|
@ -49,11 +49,10 @@ void ProcessPage_OnDebug(void)
|
|||
|
||||
for (Index=0; Index<(ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++)
|
||||
{
|
||||
memset(&lvitem, 0, sizeof(LVITEM));
|
||||
|
||||
lvitem.mask = LVIF_STATE;
|
||||
lvitem.stateMask = LVIS_SELECTED;
|
||||
lvitem.iItem = Index;
|
||||
lvitem.iSubItem = 0;
|
||||
|
||||
SendMessage(hProcessPageListCtrl, LVM_GETITEM, 0, (LPARAM) &lvitem);
|
||||
|
||||
|
|
|
@ -43,11 +43,10 @@ void ProcessPage_OnEndProcess(void)
|
|||
|
||||
for (Index=0; Index<(ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++)
|
||||
{
|
||||
memset(&lvitem, 0, sizeof(LVITEM));
|
||||
|
||||
lvitem.mask = LVIF_STATE;
|
||||
lvitem.stateMask = LVIS_SELECTED;
|
||||
lvitem.iItem = Index;
|
||||
lvitem.iSubItem = 0;
|
||||
|
||||
SendMessage(hProcessPageListCtrl, LVM_GETITEM, 0, (LPARAM) &lvitem);
|
||||
|
||||
|
@ -91,11 +90,10 @@ void ProcessPage_OnEndProcessTree(void)
|
|||
|
||||
for (Index=0; Index<(ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++)
|
||||
{
|
||||
memset(&lvitem, 0, sizeof(LVITEM));
|
||||
|
||||
lvitem.mask = LVIF_STATE;
|
||||
lvitem.stateMask = LVIS_SELECTED;
|
||||
lvitem.iItem = Index;
|
||||
lvitem.iSubItem = 0;
|
||||
|
||||
SendMessage(hProcessPageListCtrl, LVM_GETITEM, 0, (LPARAM) &lvitem);
|
||||
|
||||
|
|
|
@ -43,11 +43,10 @@ static void DoSetPriority(DWORD priority)
|
|||
|
||||
for (Index=0; Index<(ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++)
|
||||
{
|
||||
memset(&lvitem, 0, sizeof(LVITEM));
|
||||
|
||||
lvitem.mask = LVIF_STATE;
|
||||
lvitem.stateMask = LVIS_SELECTED;
|
||||
lvitem.iItem = Index;
|
||||
lvitem.iSubItem = 0;
|
||||
|
||||
SendMessage(hProcessPageListCtrl, LVM_GETITEM, 0, (LPARAM)&lvitem);
|
||||
|
||||
|
|
|
@ -322,11 +322,10 @@ static void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
|
|||
|
||||
for (Index=0; Index<(ULONG)ListView_GetItemCount(hProcessPageListCtrl); Index++)
|
||||
{
|
||||
memset(&lvitem, 0, sizeof(LVITEM));
|
||||
|
||||
lvitem.mask = LVIF_STATE;
|
||||
lvitem.stateMask = LVIS_SELECTED;
|
||||
lvitem.iItem = Index;
|
||||
lvitem.iSubItem = 0;
|
||||
|
||||
SendMessage(hProcessPageListCtrl, LVM_GETITEM, 0, (LPARAM) &lvitem);
|
||||
|
||||
|
|
Loading…
Reference in a new issue