Michael Stefaniuc : gdiplus: Remove a wrapper around GdipFree().

Alexandre Julliard julliard at winehq.org
Wed Sep 20 15:10:23 CDT 2017


Module: wine
Branch: master
Commit: 3a42c84e0fc0e975801ed7d1dfc3405840b91c54
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3a42c84e0fc0e975801ed7d1dfc3405840b91c54

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Wed Sep 20 12:28:01 2017 +0200

gdiplus: Remove a wrapper around GdipFree().

GdipFree() already deals with NULL input.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/tests/graphics.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c
index 651ba53..956ddb0 100644
--- a/dlls/gdiplus/tests/graphics.c
+++ b/dlls/gdiplus/tests/graphics.c
@@ -6225,11 +6225,6 @@ static DWORD* GetBitmapPixelBuffer(HDC hdc, HBITMAP hbmp, int width, int height)
     return buffer;
 }
 
-static void ReleaseBitmapPixelBuffer(DWORD* buffer)
-{
-    if (buffer) GdipFree(buffer);
-}
-
 static void test_GdipFillRectanglesOnMemoryDCSolidBrush(void)
 {
     ARGB color[6] = {0,0,0,0,0,0};
@@ -6279,7 +6274,7 @@ static void test_GdipFillRectanglesOnMemoryDCSolidBrush(void)
     ok(is_blue_color(color[0]) && is_blue_color(color[1]) && is_blue_color(color[2]) &&
        color[3] == 0 && color[4] == 0 && color[5] == 0,
        "Expected GdipFillRectangleI take effect!\n" );
-    ReleaseBitmapPixelBuffer(pixel);
+    GdipFree(pixel);
 
     SelectObject(hdc, old);
     DeleteObject(bmp);
@@ -6364,7 +6359,7 @@ static void test_GdipFillRectanglesOnMemoryDCTextureBrush(void)
     ok(is_blue_color(color[0]) && is_blue_color(color[1]) && is_blue_color(color[2]) &&
        color[3] == 0 && color[4] == 0 && color[5] == 0,
       "Expected GdipFillRectangleI take effect!\n" );
-    ReleaseBitmapPixelBuffer(pixel);
+    GdipFree(pixel);
 
     SelectObject(hdc, old);
     DeleteObject(bmp);
@@ -6521,7 +6516,7 @@ static void test_GdipDrawImagePointsRectOnMemoryDC(void)
     ok(is_blue_color(color[0]) && is_blue_color(color[1]) && is_blue_color(color[2]) &&
        color[3] == 0 && color[4] == 0 && color[5] == 0,
        "Expected GdipDrawImageRectRectI take effect!\n" );
-    ReleaseBitmapPixelBuffer(pixel);
+    GdipFree(pixel);
 
     SelectObject(hdc, old);
     DeleteObject(bmp);




More information about the wine-cvs mailing list