oledb32: Use the ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2018-07-18 23:01:31 +02:00 committed by Alexandre Julliard
parent 3a61d1d51e
commit 3ba9ba7af5
1 changed files with 4 additions and 4 deletions

View File

@ -328,7 +328,7 @@ static HRESULT convert_dbproperty_mode(const WCHAR *src, VARIANT *dest)
}; };
struct mode_propval *prop; struct mode_propval *prop;
if ((prop = bsearch(src, mode_propvals, sizeof(mode_propvals) / sizeof(*mode_propvals), if ((prop = bsearch(src, mode_propvals, ARRAY_SIZE(mode_propvals),
sizeof(struct mode_propval), dbmodeprop_compare))) sizeof(struct mode_propval), dbmodeprop_compare)))
{ {
V_VT(dest) = VT_I4; V_VT(dest) = VT_I4;
@ -511,7 +511,7 @@ static const struct dbproperty *get_known_dprop_descr(BSTR name)
int min, max, n; int min, max, n;
min = 0; min = 0;
max = sizeof(dbproperties)/sizeof(struct dbproperty) - 1; max = ARRAY_SIZE(dbproperties) - 1;
while (min <= max) while (min <= max)
{ {
@ -662,7 +662,7 @@ HRESULT get_data_source(IUnknown *outer, DWORD clsctx, LPWSTR initstring, REFIID
WCHAR *start, *progid; WCHAR *start, *progid;
int len; int len;
prov += sizeof(providerW)/sizeof(WCHAR)-1; prov += ARRAY_SIZE(providerW)-1;
start = prov; start = prov;
while (*prov && *prov != ';') while (*prov && *prov != ';')
++prov; ++prov;