taskmgr: Remove ZeroMemory() calls and instead set the relevant fields (usually just iSubItem) to zero manually.

This commit is contained in:
Francois Gouget 2006-10-05 11:02:27 +02:00 committed by Alexandre Julliard
parent 567d1e6e29
commit e2a1168892
5 changed files with 12 additions and 18 deletions

View file

@ -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';

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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);