itss: Use the 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-07-24 00:01:22 +02:00 committed by Alexandre Julliard
parent e611370729
commit b4b69429bd
2 changed files with 7 additions and 7 deletions

View File

@ -435,7 +435,7 @@ static HRESULT WINAPI ITS_IParseDisplayNameImpl_ParseDisplayName(
{
static const WCHAR szPrefix[] = {
'@','M','S','I','T','S','t','o','r','e',':',0 };
const DWORD prefix_len = (sizeof szPrefix/sizeof szPrefix[0])-1;
const DWORD prefix_len = ARRAY_SIZE(szPrefix)-1;
DWORD n;
ITS_IParseDisplayNameImpl *This = impl_from_IParseDisplayName(iface);

View File

@ -153,12 +153,12 @@ static LPCWSTR skip_schema(LPCWSTR url)
static const WCHAR msits_schema[] = {'m','s','-','i','t','s',':'};
static const WCHAR mk_schema[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':'};
if(!strncmpiW(its_schema, url, sizeof(its_schema)/sizeof(WCHAR)))
return url+sizeof(its_schema)/sizeof(WCHAR);
if(!strncmpiW(msits_schema, url, sizeof(msits_schema)/sizeof(WCHAR)))
return url+sizeof(msits_schema)/sizeof(WCHAR);
if(!strncmpiW(mk_schema, url, sizeof(mk_schema)/sizeof(WCHAR)))
return url+sizeof(mk_schema)/sizeof(WCHAR);
if(!strncmpiW(its_schema, url, ARRAY_SIZE(its_schema)))
return url + ARRAY_SIZE(its_schema);
if(!strncmpiW(msits_schema, url, ARRAY_SIZE(msits_schema)))
return url + ARRAY_SIZE(msits_schema);
if(!strncmpiW(mk_schema, url, ARRAY_SIZE(mk_schema)))
return url + ARRAY_SIZE(mk_schema);
return NULL;
}