Module: wine Branch: master Commit: ad576b6965fe9ce695bbf91ac229b04459af02d3 URL: https://source.winehq.org/git/wine.git/?a=commit;h=ad576b6965fe9ce695bbf91ac...
Author: Michael Stefaniuc mstefani@winehq.org Date: Thu Nov 15 20:42:20 2018 +0100
strmbase: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc mstefani@winehq.org Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/strmbase/renderer.c | 2 +- dlls/strmbase/transform.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index dc1ece2..c06661c 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -251,7 +251,7 @@ HRESULT WINAPI BaseRenderer_Init(BaseRenderer * This, const IBaseFilterVtbl *Vtb /* construct input pin */ 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));
hr = BaseInputPin_Construct(&BaseRenderer_InputPin_Vtbl, sizeof(BaseInputPin), &piInput, &input_BaseInputFuncTable, &This->filter.csFilter, NULL, (IPin **)&This->pInputPin); diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 8419b90..2fdd2ba 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -210,10 +210,10 @@ static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID* p /* construct input pin */ piInput.dir = PINDIR_INPUT; piInput.pFilter = &pTransformFilter->filter.IBaseFilter_iface; - lstrcpynW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0])); + lstrcpynW(piInput.achName, wcsInputPinName, ARRAY_SIZE(piInput.achName)); piOutput.dir = PINDIR_OUTPUT; piOutput.pFilter = &pTransformFilter->filter.IBaseFilter_iface; - lstrcpynW(piOutput.achName, wcsOutputPinName, sizeof(piOutput.achName) / sizeof(piOutput.achName[0])); + lstrcpynW(piOutput.achName, wcsOutputPinName, ARRAY_SIZE(piOutput.achName));
hr = BaseInputPin_Construct(&TransformFilter_InputPin_Vtbl, sizeof(BaseInputPin), &piInput, &tf_input_BaseInputFuncTable, &pTransformFilter->filter.csFilter, NULL, &pTransformFilter->ppPins[0]);