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

Francois Gouget fgouget at free.fr
Tue Dec 10 02:22:01 CST 2019


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

Signed-off-by: Francois Gouget <fgouget at free.fr>
---
 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 93303bafc34..d77eaebd913 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] = ':';
-- 
2.20.1




More information about the wine-devel mailing list