Piotr Caban : ole32: Initialize more FORMATETC fields using InitFormatEtc helper.
Alexandre Julliard
julliard at winehq.org
Thu Sep 27 18:25:13 CDT 2018
Module: wine
Branch: master
Commit: 058110369da4c0112d871477c960c463516d5dae
URL: https://source.winehq.org/git/wine.git/?a=commit;h=058110369da4c0112d871477c960c463516d5dae
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Sep 26 14:52:22 2018 +0200
ole32: Initialize more FORMATETC fields using InitFormatEtc helper.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ole32/tests/clipboard.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index e518996..7aeaa20 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -508,13 +508,11 @@ static void test_get_clipboard(void)
ok(hr == DV_E_FORMATETC || broken(hr == S_OK),
"IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr);
- InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL);
- fmtetc.cfFormat = CF_RIFF;
+ InitFormatEtc(fmtetc, CF_RIFF, TYMED_HGLOBAL);
hr = IDataObject_QueryGetData(data_obj, &fmtetc);
ok(hr == DV_E_CLIPFORMAT, "IDataObject_QueryGetData should have failed with DV_E_CLIPFORMAT instead of 0x%08x\n", hr);
- InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL);
- fmtetc.tymed = TYMED_FILE;
+ InitFormatEtc(fmtetc, CF_TEXT, TYMED_FILE);
hr = IDataObject_QueryGetData(data_obj, &fmtetc);
ok(hr == S_OK, "IDataObject_QueryGetData failed with error 0x%08x\n", hr);
@@ -552,14 +550,12 @@ static void test_get_clipboard(void)
ReleaseStgMedium(&stgmedium);
}
- InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL);
- fmtetc.cfFormat = CF_RIFF;
+ InitFormatEtc(fmtetc, CF_RIFF, TYMED_HGLOBAL);
hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium);
ok(hr == DV_E_FORMATETC, "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr);
if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
- InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL);
- fmtetc.tymed = TYMED_FILE;
+ InitFormatEtc(fmtetc, CF_TEXT, TYMED_FILE);
hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium);
ok(hr == DV_E_TYMED, "IDataObject_GetData should have failed with DV_E_TYMED instead of 0x%08x\n", hr);
if(SUCCEEDED(hr)) ReleaseStgMedium(&stgmedium);
More information about the wine-cvs
mailing list