Commit f0e823f2 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent fddb3896
...@@ -310,7 +310,7 @@ START_TEST(localui) ...@@ -310,7 +310,7 @@ START_TEST(localui)
while (((lpt_present == NULL) || (lpt_absent == NULL)) && id < 9) { while (((lpt_present == NULL) || (lpt_absent == NULL)) && id < 9) {
id++; id++;
sprintf(bufferA, fmt_lptA, id); sprintf(bufferA, fmt_lptA, id);
MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, ARRAY_SIZE(bufferW));
pi2 = find_portinfo2(bufferW); pi2 = find_portinfo2(bufferW);
if (pi2 && (lpt_present == NULL)) lpt_present = pi2; if (pi2 && (lpt_present == NULL)) lpt_present = pi2;
if (!pi2 && (lpt_absent == NULL)) lpt_absent = strdupW(bufferW); if (!pi2 && (lpt_absent == NULL)) lpt_absent = strdupW(bufferW);
...@@ -321,7 +321,7 @@ START_TEST(localui) ...@@ -321,7 +321,7 @@ START_TEST(localui)
while (((com_present == NULL) || (com_absent == NULL)) && id < 9) { while (((com_present == NULL) || (com_absent == NULL)) && id < 9) {
id++; id++;
sprintf(bufferA, fmt_comA, id); sprintf(bufferA, fmt_comA, id);
MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, bufferA, -1, bufferW, ARRAY_SIZE(bufferW));
pi2 = find_portinfo2(bufferW); pi2 = find_portinfo2(bufferW);
if (pi2 && (com_present == NULL)) com_present = pi2; if (pi2 && (com_present == NULL)) com_present = pi2;
if (!pi2 && (com_absent == NULL)) com_absent = strdupW(bufferW); if (!pi2 && (com_absent == NULL)) com_absent = strdupW(bufferW);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment