Commit e2a11688 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

taskmgr: Remove ZeroMemory() calls and instead set the relevant fields (usually…

taskmgr: Remove ZeroMemory() calls and instead set the relevant fields (usually just iSubItem) to zero manually.
parent 567d1e6e
......@@ -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));
lvi.mask = LVIF_TEXT;
lvi.pszText = channel->name;
lvitem.mask = LVIF_TEXT;
lvitem.pszText = channel->name;
lvitem.iItem = 0;
lvitem.iSubItem = 0;
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment