gdiplus: Remove redundant NULL check before GdipFree (Smatch).

Michael Stefaniuc mstefani at redhat.de
Thu Jun 26 15:06:02 CDT 2008


---
 dlls/gdiplus/font.c       |    4 ++--
 dlls/gdiplus/tests/font.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 0bb9fc7..254753e 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -443,8 +443,8 @@ GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily)
         return InvalidParameter;
     TRACE("Deleting %p (%s)\n", FontFamily, debugstr_w(FontFamily->FamilyName));
 
-    if (FontFamily->FamilyName) GdipFree (FontFamily->FamilyName);
-    if (FontFamily->tmw) GdipFree (FontFamily->tmw);
+    GdipFree (FontFamily->FamilyName);
+    GdipFree (FontFamily->tmw);
     GdipFree (FontFamily);
 
     return Ok;
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 93efbc4..59a8d53 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -190,7 +190,7 @@ static void test_fontfamily (void)
     stat = GdipDeleteFontFamily(*family);
     expect (Ok, stat);
 
-    if (family) GdipFree (family);
+    GdipFree (family);
 }
 
 
-- 
1.5.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080626/20b70b3b/attachment.pgp 


More information about the wine-patches mailing list