Francois Gouget : winspool.drv/tests: Avoid an unneeded strlen() call.
Module: wine Branch: master Commit: 71ad4add7361c87936a103a4f759f0ff11e7797f URL: https://source.winehq.org/git/wine.git/?a=commit;h=71ad4add7361c87936a103a4f... Author: Francois Gouget <fgouget(a)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(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)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()))
participants (1)
-
Alexandre Julliard