Jacek Caban : mshtml: Don't mix nsresult with HRESULT.

Alexandre Julliard julliard at winehq.org
Mon Feb 18 08:50:42 CST 2008


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb 18 01:07:24 2008 +0100

mshtml: Don't mix nsresult with HRESULT.

---

 dlls/mshtml/editor.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c
index 542bf55..057ac24 100644
--- a/dlls/mshtml/editor.c
+++ b/dlls/mshtml/editor.c
@@ -1163,6 +1163,7 @@ static HRESULT exec_hyperlink(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
     nsISelection *nsselection;
     nsIDOMDocument *nsdoc;
     nsresult nsres;
+    HRESULT hres = E_FAIL;
 
     TRACE("%p, 0x%x, %p, %p\n", This, cmdexecopt, in, out);
 
@@ -1242,9 +1243,9 @@ static HRESULT exec_hyperlink(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
 
         nsIDOMElement_Release(anchor_elem);
         nsIDOMDocument_Release(nsdoc);
+
+        hres = NS_SUCCEEDED(nsres) ? S_OK : E_FAIL;
     }
-    else
-        nsres = E_FAIL;
 
     nsISelection_Release(nsselection);
 
@@ -1252,7 +1253,7 @@ static HRESULT exec_hyperlink(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
         SysFreeString(url);
 
     TRACE("-- 0x%08x\n", nsres);
-    return nsres;
+    return hres;
 }
 
 static HRESULT query_selall_status(HTMLDocument *This, OLECMD *cmd)




More information about the wine-cvs mailing list