Nikolay Sivov : msvcrt/tests: Use matching type to get array element count (PVS-Studio).

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 13 10:53:46 CDT 2015


Module: wine
Branch: master
Commit: d8623f82419327583a917a6769102854cc32da5b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d8623f82419327583a917a6769102854cc32da5b

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Oct 12 22:07:19 2015 +0300

msvcrt/tests: Use matching type to get array element count (PVS-Studio).

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/tests/string.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c
index 7733a7c..4144d17 100644
--- a/dlls/msvcrt/tests/string.c
+++ b/dlls/msvcrt/tests/string.c
@@ -1108,7 +1108,7 @@ static void test__wcslwr_s(void)
 
     /* Test NULL input string and valid size. */
     errno = EBADF;
-    ret = p_wcslwr_s(NULL, sizeof(buffer)/sizeof(wchar_t));
+    ret = p_wcslwr_s(NULL, sizeof(buffer)/sizeof(buffer[0]));
     ok(ret == EINVAL, "expected EINVAL, got %d\n", ret);
     ok(errno == EINVAL, "expected errno EINVAL, got %d\n", errno);
 




More information about the wine-cvs mailing list