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

wbemdisp: Use the ARRAY_SIZE() macro.

parent c77defed
......@@ -1641,7 +1641,7 @@ static HRESULT WINAPI services_DeleteAsync(
static BSTR build_query_string( const WCHAR *class )
{
static const WCHAR selectW[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',0};
UINT len = strlenW(class) + sizeof(selectW) / sizeof(selectW[0]);
UINT len = strlenW(class) + ARRAY_SIZE(selectW);
BSTR ret;
if (!(ret = SysAllocStringLen( NULL, len ))) return NULL;
......@@ -2074,7 +2074,7 @@ static BSTR build_resource_string( BSTR server, BSTR namespace )
if (server && *server) len_server = strlenW( server );
else len_server = 1;
if (namespace && *namespace) len_namespace = strlenW( namespace );
else len_namespace = sizeof(defaultW) / sizeof(defaultW[0]) - 1;
else len_namespace = ARRAY_SIZE(defaultW) - 1;
if (!(ret = SysAllocStringLen( NULL, 2 + len_server + 1 + len_namespace ))) return NULL;
......
......@@ -374,7 +374,7 @@ static HRESULT WINAPI WinMGMTS_ParseDisplayName(IParseDisplayName *iface, IBindC
ULONG *pchEaten, IMoniker **ppmkOut)
{
static const WCHAR prefixW[] = {'w','i','n','m','g','m','t','s',':',0};
const DWORD prefix_len = sizeof(prefixW) / sizeof(prefixW[0]) - 1;
const DWORD prefix_len = ARRAY_SIZE(prefixW) - 1;
ISWbemLocator *locator = NULL;
ISWbemServices *services = NULL;
ISWbemObject *obj = NULL;
......
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