Commit 8ba2b2da authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dnsapi: Use the ARRAY_SIZE() macro.

parent 84d4887f
......@@ -618,7 +618,7 @@ static DNS_STATUS dns_do_query( PCSTR name, WORD type, DWORD options, PDNS_RECOR
goto exit;
}
for (i = 0; i < sizeof(sections)/sizeof(sections[0]); i++)
for (i = 0; i < ARRAY_SIZE(sections); i++)
{
for (num = 0; num < ns_msg_count( msg, sections[i] ); num++)
{
......@@ -771,7 +771,7 @@ static DNS_STATUS dns_get_hostname_a( COMPUTER_NAME_FORMAT format,
PSTR buffer, PDWORD len )
{
char name[256];
DWORD size = sizeof(name)/sizeof(name[0]);
DWORD size = ARRAY_SIZE(name);
if (!GetComputerNameExA( format, name, &size ))
return DNS_ERROR_NAME_DOES_NOT_EXIST;
......@@ -790,7 +790,7 @@ static DNS_STATUS dns_get_hostname_w( COMPUTER_NAME_FORMAT format,
PWSTR buffer, PDWORD len )
{
WCHAR name[256];
DWORD size = sizeof(name)/sizeof(name[0]);
DWORD size = ARRAY_SIZE(name);
if (!GetComputerNameExW( format, name, &size ))
return DNS_ERROR_NAME_DOES_NOT_EXIST;
......
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