gdi32: Avoid a needless goto

Dmitry Timoshkov dmitry at codeweavers.com
Sun Mar 4 02:30:43 CST 2007


Hello,

Changelog:
    gdi32: Avoid a needless goto.

---
 dlls/gdi32/font.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 2578f33..3fc4420 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -3223,14 +3223,14 @@ UINT WINAPI GetTextCharsetInfo(HDC hdc, LPFONTSIGNATURE fs, DWORD flags)
     UINT ret = DEFAULT_CHARSET;
     DC *dc = DC_GetDCPtr(hdc);
 
-    if (!dc) goto done;
-
-    if (dc->gdiFont)
-        ret = WineEngGetTextCharsetInfo(dc->gdiFont, fs, flags);
+    if (dc)
+    {
+        if (dc->gdiFont)
+            ret = WineEngGetTextCharsetInfo(dc->gdiFont, fs, flags);
 
-    GDI_ReleaseObj(hdc);
+        GDI_ReleaseObj(hdc);
+    }
 
-done:
     if (ret == DEFAULT_CHARSET && fs)
         memset(fs, 0, sizeof(FONTSIGNATURE));
     return ret;
-- 
1.5.0.2






More information about the wine-patches mailing list