Francois Gouget : winspool.drv/tests: Avoid an unneeded strlen() call.

Alexandre Julliard julliard at winehq.org
Mon Sep 30 16:19:06 CDT 2019


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

Author: Francois Gouget <fgouget at free.fr>
Date:   Mon Sep 30 01:39:57 2019 +0200

winspool.drv/tests: Avoid an unneeded strlen() call.

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

---

 dlls/winspool.drv/tests/info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c
index bfc80ce0f6..03a2e3cd32 100644
--- a/dlls/winspool.drv/tests/info.c
+++ b/dlls/winspool.drv/tests/info.c
@@ -1456,7 +1456,7 @@ static void test_GetDefaultPrinter(void)
 
     SetLastError(ERROR_SUCCESS);
     retval = pGetDefaultPrinterA(buffer, &exact);
-    if (!retval || !exact || !strlen(buffer) ||
+    if (!retval || !exact || !*buffer ||
 	(ERROR_SUCCESS != GetLastError())) {
 	if ((ERROR_FILE_NOT_FOUND == GetLastError()) ||
 	    (ERROR_INVALID_NAME == GetLastError()))




More information about the wine-cvs mailing list