[PATCH] midimap: Use the ARRAY_SIZE() macro

Andrew Eikum aeikum at codeweavers.com
Fri Aug 10 08:05:19 CDT 2018


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

On Mon, Jul 30, 2018 at 09:18:11PM +0200, Michael Stefaniuc wrote:
> Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
> ---
>  dlls/midimap/midimap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dlls/midimap/midimap.c b/dlls/midimap/midimap.c
> index 1b35da7609..290300a55a 100644
> --- a/dlls/midimap/midimap.c
> +++ b/dlls/midimap/midimap.c
> @@ -172,7 +172,7 @@ static BOOL	MIDIMAP_LoadSettingsScheme(MIDIMAPDATA* mom, const WCHAR* scheme)
>  	return FALSE;
>      }
>  
> -    for (idx = 0; !RegEnumKeyW(hKey, idx, buffer, sizeof(buffer)/sizeof(buffer[0])); idx++)
> +    for (idx = 0; !RegEnumKeyW(hKey, idx, buffer, ARRAY_SIZE(buffer)); idx++)
>      {
>  	if (RegOpenKeyW(hKey, buffer, &hPortKey)) continue;
>  
> -- 
> 2.14.4
> 
> 
> 



More information about the wine-devel mailing list