wineqtdecoder: 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-11-06 21:01:07 +01:00 committed by Alexandre Julliard
parent 7e5b5cb1aa
commit 9629769fe7
3 changed files with 3 additions and 3 deletions

View File

@ -141,7 +141,7 @@ FactoryTemplate const g_Templates[] = {
}
};
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
int g_cTemplates = ARRAY_SIZE(g_Templates);
static HINSTANCE hInst = NULL;
/***********************************************************************

View File

@ -361,7 +361,7 @@ static pascal ComponentResult myDataHGetFileName ( DataHandler dh, Str255 str)
int i;
IAsyncReader_SyncRead(data->dataRef.pReader, 0, 8, header);
for (i=0; i < sizeof(stream_sigs)/sizeof(signature); i++)
for (i = 0; i < ARRAY_SIZE(stream_sigs); i++)
if (memcmp(header, stream_sigs[i].sig, stream_sigs[i].sig_length)==0)
{
str[0] = strlen(stream_sigs[i].fname);

View File

@ -277,7 +277,7 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *punkout, HRESULT *phr)
piInput = &This->pInputPin.pin.pinInfo;
piInput->dir = PINDIR_INPUT;
piInput->pFilter = &This->filter.IBaseFilter_iface;
lstrcpynW(piInput->achName, wcsInputPinName, sizeof(piInput->achName) / sizeof(piInput->achName[0]));
lstrcpynW(piInput->achName, wcsInputPinName, ARRAY_SIZE(piInput->achName));
This->pInputPin.pin.IPin_iface.lpVtbl = &QT_InputPin_Vtbl;
This->pInputPin.pin.refCount = 1;
This->pInputPin.pin.pConnectedTo = NULL;