[PATCH 1/2] winmm/tests: Avoid and ARRAY_SIZE-like macro
Andrew Eikum
aeikum at codeweavers.com
Thu Jun 14 07:17:00 CDT 2018
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
On Wed, Jun 13, 2018 at 08:30:26PM +0200, Michael Stefaniuc wrote:
> Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
> ---
> dlls/winmm/tests/capture.c | 2 +-
> dlls/winmm/tests/wave.c | 2 +-
> dlls/winmm/tests/winmm_test.h | 1 -
> 3 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/dlls/winmm/tests/capture.c b/dlls/winmm/tests/capture.c
> index fd4005cdab..ba71f9ca80 100644
> --- a/dlls/winmm/tests/capture.c
> +++ b/dlls/winmm/tests/capture.c
> @@ -398,7 +398,7 @@ static void wave_in_test_device(UINT_PTR device)
>
> HeapFree(GetProcessHeap(), 0, nameA);
>
> - for (f=0;f<NB_WIN_FORMATS;f++) {
> + for (f = 0; f < ARRAY_SIZE(win_formats); f++) {
> format.wFormatTag=WAVE_FORMAT_PCM;
> format.nChannels=win_formats[f][3];
> format.wBitsPerSample=win_formats[f][2];
> diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c
> index 8d7dfd6b68..b402e21917 100644
> --- a/dlls/winmm/tests/wave.c
> +++ b/dlls/winmm/tests/wave.c
> @@ -1041,7 +1041,7 @@ static void wave_out_test_device(UINT_PTR device)
> CALLBACK_EVENT,&capsA,TRUE,FALSE,FALSE);
> }
>
> - for (f=0;f<NB_WIN_FORMATS;f++) {
> + for (f = 0; f < ARRAY_SIZE(win_formats); f++) {
> format.wFormatTag=WAVE_FORMAT_PCM;
> format.nChannels=win_formats[f][3];
> format.wBitsPerSample=win_formats[f][2];
> diff --git a/dlls/winmm/tests/winmm_test.h b/dlls/winmm/tests/winmm_test.h
> index 177dc2e837..d5fb70afbd 100644
> --- a/dlls/winmm/tests/winmm_test.h
> +++ b/dlls/winmm/tests/winmm_test.h
> @@ -68,7 +68,6 @@ static const unsigned int win_formats[][4] = {
> {WAVE_FORMAT_96M16, 96000, 16, 1},
> {WAVE_FORMAT_96S16, 96000, 16, 2}
> };
> -#define NB_WIN_FORMATS (sizeof(win_formats)/sizeof(*win_formats))
>
> extern const char* dev_name(int);
> extern const char* wave_open_flags(DWORD);
> --
> 2.14.4
>
>
>
More information about the wine-devel
mailing list