Francois Gouget : kernelbase/tests: Avoid an uneeded lstrlenW() call.

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


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

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

kernelbase/tests: Avoid an uneeded lstrlenW() call.

Note that path_outW is an array and thus cannot be NULL.

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

---

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

diff --git a/dlls/kernelbase/tests/path.c b/dlls/kernelbase/tests/path.c
index 93303bafc3..d77eaebd91 100644
--- a/dlls/kernelbase/tests/path.c
+++ b/dlls/kernelbase/tests/path.c
@@ -1110,7 +1110,7 @@ static void test_PathCchCanonicalize(void)
     hr = pPathCchCanonicalize(path_outW, ARRAY_SIZE(path_outW), path_inW);
     ok(hr == HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE), "expect hr %#x, got %#x %s\n",
        HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE), hr, wine_dbgstr_w(path_outW));
-    ok(lstrlenW(path_outW) == 0, "got %d\n", lstrlenW(path_outW));
+    ok(!*path_outW, "got %d\n", lstrlenW(path_outW));
 
     path_inW[0] = 'C';
     path_inW[1] = ':';




More information about the wine-cvs mailing list