https://git.reactos.org/?p=reactos.git;a=commitdiff;h=55b4e50af85d76917f741…
commit 55b4e50af85d76917f741229f1be48ade6176b75
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 23:50:39 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:58 2022 +0100
[WINESYNC] msi: Avoid an ARRAY_SIZE-like macro.
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id b8027768b88eed2376ea484aa7adef20c82483f4 by Michael Stefaniuc
<mstefani(a)winehq.org>
---
dll/win32/msi/dialog.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c
index 3f2ddc36d6f..f0222de0a66 100644
--- a/dll/win32/msi/dialog.c
+++ b/dll/win32/msi/dialog.c
@@ -3479,8 +3479,6 @@ static const struct control_handler msi_dialog_handler[] =
{ szHyperLink, msi_dialog_hyperlink }
};
-#define NUM_CONTROL_TYPES (sizeof msi_dialog_handler/sizeof msi_dialog_handler[0])
-
static UINT msi_dialog_create_controls( MSIRECORD *rec, LPVOID param )
{
msi_dialog *dialog = param;
@@ -3489,10 +3487,10 @@ static UINT msi_dialog_create_controls( MSIRECORD *rec, LPVOID
param )
/* find and call the function that can create this type of control */
control_type = MSI_RecordGetString( rec, 3 );
- for( i=0; i<NUM_CONTROL_TYPES; i++ )
+ for( i = 0; i < ARRAY_SIZE( msi_dialog_handler ); i++ )
if (!strcmpiW( msi_dialog_handler[i].control_type, control_type ))
break;
- if( i != NUM_CONTROL_TYPES )
+ if( i != ARRAY_SIZE( msi_dialog_handler ))
msi_dialog_handler[i].func( dialog, rec );
else
ERR("no handler for element type %s\n", debugstr_w(control_type));