Re: Minor dlls/mshtml/htmlbody.c simplification (RESEND)

2010-05-01 Thread Nikolay Sivov

On 5/1/2010 04:04, Gerald Pfeifer wrote:

On Wed, 28 Apr 2010, Nikolay Sivov wrote:
   

Please follow wine-devel comments:

http://www.winehq.org/pipermail/wine-devel/2010-April/083175.html
 

Ouch, I had missed this message -- certainly did not mean to ignore
the good feedback.

Is the following what you had in mind?

Gerald


ChangeLog:
Fix return value for HTMLBodyElement_get_text.

---
  dlls/mshtml/htmlbody.c |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c
index 5c66e65..65aa549 100644
--- a/dlls/mshtml/htmlbody.c
+++ b/dlls/mshtml/htmlbody.c
@@ -443,7 +443,7 @@ static HRESULT WINAPI 
HTMLBodyElement_get_text(IHTMLBodyElement *iface, VARIANT
  HTMLBodyElement *This = HTMLBODY_THIS(iface);
  nsAString text;
  nsresult nsres;
-HRESULT hres;
+HRESULT hres = S_OK;

  TRACE((%p)-(%p)\n, This, p);

@@ -462,7 +462,7 @@ static HRESULT WINAPI 
HTMLBodyElement_get_text(IHTMLBodyElement *iface, VARIANT

  nsAString_Finish(text);

-return S_OK;
+return hres;
  }

  static HRESULT WINAPI HTMLBodyElement_put_link(IHTMLBodyElement *iface, 
VARIANT v)
   

Yes, but you don't have to initialize it to S_OK.




Re: Minor dlls/mshtml/htmlbody.c simplification (RESEND)

2010-04-28 Thread Nikolay Sivov

On 4/28/2010 14:02, Gerald Pfeifer wrote:

ChangeLog:
Remove variable hres which is not really used from HTMLBodyElement_get_text.

diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c
index 5c66e65..c6b202b 100644
--- a/dlls/mshtml/htmlbody.c
+++ b/dlls/mshtml/htmlbody.c
@@ -443,7 +443,6 @@ static HRESULT WINAPI 
HTMLBodyElement_get_text(IHTMLBodyElement *iface, VARIANT
  HTMLBodyElement *This = HTMLBODY_THIS(iface);
  nsAString text;
  nsresult nsres;
-HRESULT hres;

  TRACE((%p)-(%p)\n, This, p);

@@ -454,10 +453,8 @@ static HRESULT WINAPI 
HTMLBodyElement_get_text(IHTMLBodyElement *iface, VARIANT

  nsAString_GetData(text,color);
  V_VT(p) = VT_BSTR;
-hres = nscolor_to_str(color,V_BSTR(p));
  }else {
  ERR(GetText failed: %08x\n, nsres);
-hres = E_FAIL;
  }

  nsAString_Finish(text);
   

Please follow wine-devel comments:

http://www.winehq.org/pipermail/wine-devel/2010-April/083175.html