comctl32/tests: Avoid using memset() on RECTs.

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-07-30 21:55:12 +02:00 committed by Alexandre Julliard
parent 86ac45836d
commit 61a6f98a9e
2 changed files with 6 additions and 9 deletions

View File

@ -890,8 +890,7 @@ static void test_images(void)
r = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item);
ok(r == 0, "should not fail\n");
memset(&r1, 0, sizeof r1);
r1.left = LVIR_ICON;
SetRect(&r1, LVIR_ICON, 0, 0, 0);
r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM) &r1);
expect(1, r);
@ -903,8 +902,7 @@ static void test_images(void)
r = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item);
ok(r == 0, "should not fail\n");
memset(&r2, 0, sizeof r2);
r2.left = LVIR_ICON;
SetRect(&r2, LVIR_ICON, 0, 0, 0);
r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM) &r2);
expect(1, r);
@ -3605,8 +3603,7 @@ static void test_hittest(void)
r = SendMessageA(hwnd, LVM_SETCOLUMNWIDTH, 1, MAKELPARAM(100, 0));
expect(TRUE, r);
memset(&bounds, 0, sizeof(bounds));
bounds.left = LVIR_BOUNDS;
SetRect(&bounds, LVIR_BOUNDS, 0, 0, 0);
r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&bounds);
expect(1, r);
ok(bounds.bottom - bounds.top > 0, "Expected non zero item height\n");
@ -3834,7 +3831,7 @@ static void test_getitemposition(void)
expect(TRUE, r);
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, getitemposition_seq2, "get item position 2", TRUE);
memset(&rect, 0, sizeof(rect));
SetRectEmpty(&rect);
SendMessageA(header, HDM_GETITEMRECT, 0, (LPARAM)&rect);
/* some padding? */
expect(2, pt.x);

View File

@ -655,8 +655,8 @@ static void test_position(void)
oldproc = (WNDPROC)SetWindowLongPtrA(hWndTrackbar, GWLP_WNDPROC, (LONG_PTR)trackbar_no_wmpaint_proc);
SetWindowLongPtrA(hWndTrackbar, GWLP_USERDATA, (LONG_PTR)oldproc);
memset(&rect, 0, sizeof(rect));
memset(&rect2, 0, sizeof(rect2));
SetRectEmpty(&rect);
SetRectEmpty(&rect2);
SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);