[PATCH] midimap: Use the ARRAY_SIZE() macro

Michael Stefaniuc mstefani at winehq.org
Mon Jul 30 14:11:52 CDT 2018


---
 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