Francois Gouget : msxml3/tests: Avoid an unneeded lstrlenW() call.

Alexandre Julliard julliard at winehq.org
Tue Dec 10 15:58:50 CST 2019


Module: wine
Branch: master
Commit: a245084ae840ab625671a6b70e2ea8b0ac3e0a3f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a245084ae840ab625671a6b70e2ea8b0ac3e0a3f

Author: Francois Gouget <fgouget at free.fr>
Date:   Tue Dec 10 09:22:36 2019 +0100

msxml3/tests: Avoid an unneeded lstrlenW() call.

This being a test we have to assume IXMLElement_get_text() could return
a NULL string.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msxml3/tests/xmldoc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/msxml3/tests/xmldoc.c b/dlls/msxml3/tests/xmldoc.c
index 359297f592..693af19571 100644
--- a/dlls/msxml3/tests/xmldoc.c
+++ b/dlls/msxml3/tests/xmldoc.c
@@ -972,7 +972,7 @@ static void test_xmlelem(void)
 
     hr = IXMLElement_get_text(element, &str);
     ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
-    ok(lstrlenW(str) == 0, "Expected empty text\n");
+    ok(str && !*str, "Expected empty text\n");
     SysFreeString(str);
 
     /* put_text with an ELEMENT */




More information about the wine-cvs mailing list