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

Francois Gouget fgouget at free.fr
Sun Sep 29 18:39:57 CDT 2019


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

Signed-off-by: Francois Gouget <fgouget at free.fr>
---
 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 bfc80ce0f6d..03a2e3cd32a 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()))
-- 
2.20.1



More information about the wine-devel mailing list