Rob Shearman : oledb32: Fix style of accessing prgPropertySets in Test_DBProperties_GetProperty.
Alexandre Julliard
julliard at winehq.org
Thu Nov 12 10:22:09 CST 2009
Module: wine
Branch: master
Commit: bafd91106ec93cb795756066b0642bc97c356cf7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bafd91106ec93cb795756066b0642bc97c356cf7
Author: Rob Shearman <robertshearman at gmail.com>
Date: Thu Nov 12 00:30:32 2009 +0000
oledb32: Fix style of accessing prgPropertySets in Test_DBProperties_GetProperty.
The parameter is a pointer to an array, so don't access it like it is
an array of pointers.
---
dlls/oledb32/tests/marshal.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/oledb32/tests/marshal.c b/dlls/oledb32/tests/marshal.c
index 4ca3aac..67fc7fd 100644
--- a/dlls/oledb32/tests/marshal.c
+++ b/dlls/oledb32/tests/marshal.c
@@ -168,21 +168,21 @@ static HRESULT WINAPI Test_DBProperties_GetProperties(
todo_wine
ok(*pcPropertySets == 0, "Expected *pcPropertySets to be 0 instead of %d\n", *pcPropertySets);
*pcPropertySets = 1;
- prgPropertySets[0] = CoTaskMemAlloc(sizeof(DBPROPSET));
- prgPropertySets[0]->rgProperties = CoTaskMemAlloc(sizeof(DBPROP));
- prgPropertySets[0]->rgProperties[0].dwPropertyID = TEST_PROPID;
- prgPropertySets[0]->rgProperties[0].dwOptions = DBPROPOPTIONS_REQUIRED;
- prgPropertySets[0]->rgProperties[0].dwStatus = S_OK;
- prgPropertySets[0]->rgProperties[0].colid.eKind = DBKIND_GUID_NAME;
+ *prgPropertySets = CoTaskMemAlloc(sizeof(DBPROPSET));
+ (*prgPropertySets)[0].rgProperties = CoTaskMemAlloc(sizeof(DBPROP));
+ (*prgPropertySets)[0].rgProperties[0].dwPropertyID = TEST_PROPID;
+ (*prgPropertySets)[0].rgProperties[0].dwOptions = DBPROPOPTIONS_REQUIRED;
+ (*prgPropertySets)[0].rgProperties[0].dwStatus = S_OK;
+ (*prgPropertySets)[0].rgProperties[0].colid.eKind = DBKIND_GUID_NAME;
/* colid contents */
- prgPropertySets[0]->rgProperties[0].colid.uGuid.guid = IID_IDBProperties;
- prgPropertySets[0]->rgProperties[0].colid.uName.pwszName = CoTaskMemAlloc(sizeof(wszDBPropertyColumnName));
- memcpy(prgPropertySets[0]->rgProperties[0].colid.uName.pwszName, wszDBPropertyColumnName, sizeof(wszDBPropertyColumnName));
+ (*prgPropertySets)[0].rgProperties[0].colid.uGuid.guid = IID_IDBProperties;
+ (*prgPropertySets)[0].rgProperties[0].colid.uName.pwszName = CoTaskMemAlloc(sizeof(wszDBPropertyColumnName));
+ memcpy((*prgPropertySets)[0].rgProperties[0].colid.uName.pwszName, wszDBPropertyColumnName, sizeof(wszDBPropertyColumnName));
/* vValue contents */
- V_VT(&prgPropertySets[0]->rgProperties[0].vValue) = VT_BSTR;
- V_BSTR(&prgPropertySets[0]->rgProperties[0].vValue) = SysAllocString(wszDBPropertyTestString);
- prgPropertySets[0]->cProperties = 1;
- prgPropertySets[0]->guidPropertySet = IID_IDBProperties;
+ V_VT(&(*prgPropertySets)[0].rgProperties[0].vValue) = VT_BSTR;
+ V_BSTR(&(*prgPropertySets)[0].rgProperties[0].vValue) = SysAllocString(wszDBPropertyTestString);
+ (*prgPropertySets)[0].cProperties = 1;
+ (*prgPropertySets)[0].guidPropertySet = IID_IDBProperties;
return S_OK;
}
More information about the wine-cvs
mailing list