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:
parent
3a61d1d51e
commit
3ba9ba7af5
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue