Michael Stefaniuc : comctl32/tests: Get rid of a temp buffer.
Alexandre Julliard
julliard at winehq.org
Wed Dec 12 15:14:54 CST 2012
Module: wine
Branch: master
Commit: ab55448069d34804572823381315fe47a098e765
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ab55448069d34804572823381315fe47a098e765
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Tue Dec 11 22:18:15 2012 +0100
comctl32/tests: Get rid of a temp buffer.
---
dlls/comctl32/tests/imagelist.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index 98b84a6..f2da3c2 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -782,22 +782,21 @@ static void check_ilhead_data(const char *ilh_data, INT cx, INT cy, INT cur, INT
static HBITMAP create_bitmap(INT cx, INT cy, COLORREF color, const char *comment)
{
HDC hdc;
- char bmibuf[sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD)];
- BITMAPINFO *bmi = (BITMAPINFO *)bmibuf;
+ BITMAPINFO bmi;
HBITMAP hbmp, hbmp_old;
HBRUSH hbrush;
RECT rc = { 0, 0, cx, cy };
hdc = CreateCompatibleDC(0);
- memset(bmi, 0, sizeof(*bmi));
- bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader);
- bmi->bmiHeader.biHeight = cx;
- bmi->bmiHeader.biWidth = cy;
- bmi->bmiHeader.biBitCount = 24;
- bmi->bmiHeader.biPlanes = 1;
- bmi->bmiHeader.biCompression = BI_RGB;
- hbmp = CreateDIBSection(hdc, bmi, DIB_RGB_COLORS, NULL, NULL, 0);
+ memset(&bmi, 0, sizeof(bmi));
+ bmi.bmiHeader.biSize = sizeof(bmi.bmiHeader);
+ bmi.bmiHeader.biHeight = cx;
+ bmi.bmiHeader.biWidth = cy;
+ bmi.bmiHeader.biBitCount = 24;
+ bmi.bmiHeader.biPlanes = 1;
+ bmi.bmiHeader.biCompression = BI_RGB;
+ hbmp = CreateDIBSection(hdc, &bmi, DIB_RGB_COLORS, NULL, NULL, 0);
hbmp_old = SelectObject(hdc, hbmp);
More information about the wine-cvs
mailing list