Francois Gouget : msvcrt/tests: Avoid an unneeded strlen() call.
Module: wine Branch: master Commit: 92d31164aa6d467e2afde7e71446d110d5fdc73f URL: https://source.winehq.org/git/wine.git/?a=commit;h=92d31164aa6d467e2afde7e71... Author: Francois Gouget <fgouget(a)free.fr> Date: Tue Dec 10 09:28:43 2019 +0100 msvcrt/tests: Avoid an unneeded strlen() call. Note that buf is an array and thus cannot be NULL. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/tests/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/tests/misc.c b/dlls/msvcrt/tests/misc.c index c59464f82d..7e2a7e4069 100644 --- a/dlls/msvcrt/tests/misc.c +++ b/dlls/msvcrt/tests/misc.c @@ -211,7 +211,7 @@ static void test_strerror_s(void) memset(buf, 'X', sizeof(buf)); ret = pstrerror_s(buf, 1, 0); ok(ret == 0, "Expected strerror_s to return 0, got %d\n", ret); - ok(strlen(buf) == 0, "Expected output buffer to be null terminated\n"); + ok(buf[0] == 0, "Expected output buffer to be null terminated\n"); memset(buf, 'X', sizeof(buf)); ret = pstrerror_s(buf, 2, 0);
participants (1)
-
Alexandre Julliard