From: Timo Kreuzer Date: Mon, 14 May 2012 11:48:17 +0000 (+0000) Subject: [GDI32_APITEST] X-Git-Tag: backups/ros-csrss@57560~955 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=cb383858f1b8992e627c6c8da79450425a61741a [GDI32_APITEST] Simplify code svn path=/trunk/; revision=56586 --- diff --git a/rostests/apitests/gdi32/CreateDIBitmap.c b/rostests/apitests/gdi32/CreateDIBitmap.c index 1e54371cc20..f2ce391f992 100644 --- a/rostests/apitests/gdi32/CreateDIBitmap.c +++ b/rostests/apitests/gdi32/CreateDIBitmap.c @@ -28,7 +28,7 @@ GetExpected( return FALSE; } - if (fuUsage != 0) + if (fuUsage != DIB_RGB_COLORS) { if (hdc == (HDC)-1) { @@ -76,16 +76,6 @@ GetExpected( return TRUE; } - if (lpbmih && (lpbmih != (PVOID)0xc0000000) && (lpbmih->biSize != 0)) - { - if (hdc == (HDC)-1) - { - *pdwError = ERROR_INVALID_PARAMETER; - return FALSE; - } - } - - if ((lpbmih == NULL) || (lpbmih == (PVOID)0xC0000000) || (lpbmih->biSize == 0)) @@ -93,6 +83,13 @@ GetExpected( return FALSE; } + if (hdc == (HDC)-1) + { + *pdwError = ERROR_INVALID_PARAMETER; + return FALSE; + } + + if (lpbmi == (PVOID)0xc0000000) return FALSE;