advapi32/tests: Use the available ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2018-03-29 17:14:14 +02:00 committed by Alexandre Julliard
parent 30276291fa
commit 716103b1bb
1 changed files with 3 additions and 3 deletions

View File

@ -1755,7 +1755,7 @@ static void test_reg_query_value(void)
/* unicode - try size in WCHARS */ /* unicode - try size in WCHARS */
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
size = sizeof(valW) / sizeof(WCHAR); size = ARRAY_SIZE(valW);
ret = RegQueryValueW(subkey, NULL, valW, &size); ret = RegQueryValueW(subkey, NULL, valW, &size);
ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret); ok(ret == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", ret);
ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
@ -2010,7 +2010,7 @@ static void test_reg_query_info(void)
lstrcpyW(expectbufferW, subkey_classW); lstrcpyW(expectbufferW, subkey_classW);
ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)),
"classbufferW = %s, expected %s\n", "classbufferW = %s, expected %s\n",
wine_dbgstr_wn(classbufferW, sizeof(classbufferW) / sizeof(WCHAR)), wine_dbgstr_w(expectbufferW)); wine_dbgstr_wn(classbufferW, ARRAY_SIZE(classbufferW)), wine_dbgstr_w(expectbufferW));
memset(classbufferW, 0x55, sizeof(classbufferW)); memset(classbufferW, 0x55, sizeof(classbufferW));
classlen = 0xdeadbeef; classlen = 0xdeadbeef;
@ -2021,7 +2021,7 @@ static void test_reg_query_info(void)
lstrcpyW(expectbufferW, subkey_classW); lstrcpyW(expectbufferW, subkey_classW);
ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)), ok(!memcmp(classbufferW, expectbufferW, sizeof(classbufferW)),
"classbufferW = %s, expected %s\n", "classbufferW = %s, expected %s\n",
wine_dbgstr_wn(classbufferW, sizeof(classbufferW) / sizeof(WCHAR)), wine_dbgstr_w(expectbufferW)); wine_dbgstr_wn(classbufferW, ARRAY_SIZE(classbufferW)), wine_dbgstr_w(expectbufferW));
RegDeleteKeyA(subsubkey, ""); RegDeleteKeyA(subsubkey, "");
RegCloseKey(subsubkey); RegCloseKey(subsubkey);