Michael Stefaniuc : dplayx/tests: Use the available ARRAY_SIZE() macro.
Module: wine Branch: master Commit: 589a57741616090fb781e5034664663066cefafb URL: https://source.winehq.org/git/wine.git/?a=commit;h=589a57741616090fb781e5034... Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue May 29 01:05:26 2018 +0200 dplayx/tests: Use the available ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dplayx/tests/dplayx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dplayx/tests/dplayx.c b/dlls/dplayx/tests/dplayx.c index f4e7301..ea6525f 100644 --- a/dlls/dplayx/tests/dplayx.c +++ b/dlls/dplayx/tests/dplayx.c @@ -767,7 +767,7 @@ static BOOL CALLBACK callback_providersA(GUID* guid, char *name, DWORD major, DW if (!prov) return TRUE; - if (prov->call_count < sizeof(prov->guid_data) / sizeof(prov->guid_data[0])) + if (prov->call_count < ARRAY_SIZE(prov->guid_data)) { prov->guid_ptr[prov->call_count] = guid; prov->guid_data[prov->call_count] = *guid; @@ -786,7 +786,7 @@ static BOOL CALLBACK callback_providersW(GUID* guid, WCHAR *name, DWORD major, D if (!prov) return TRUE; - if (prov->call_count < sizeof(prov->guid_data) / sizeof(prov->guid_data[0])) + if (prov->call_count < ARRAY_SIZE(prov->guid_data)) { prov->guid_ptr[prov->call_count] = guid; prov->guid_data[prov->call_count] = *guid; @@ -896,7 +896,7 @@ static BOOL CALLBACK EnumAddress_cb2( REFGUID guidDataType, { BOOL found = FALSE; int i; - for( i=0; i < sizeof(sps) / sizeof(sps[0]) && !found; i++ ) + for( i=0; i < ARRAY_SIZE(sps) && !found; i++ ) found = IsEqualGUID( sps[i], lpData ); ok( found, "Unknown Address type found %s\n", wine_dbgstr_guid(lpData) ); }
participants (1)
-
Alexandre Julliard