Module: wine Branch: master Commit: f082e4f216b497888f76f5fdc9ed26d2d0779072 URL: https://gitlab.winehq.org/wine/wine/-/commit/f082e4f216b497888f76f5fdc9ed26d...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Jul 14 09:26:44 2023 +0200
oledlg: Use nameless unions/structs.
---
dlls/oledlg/pastespl.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c index a502ae6c4a9..7813ecd0c5f 100644 --- a/dlls/oledlg/pastespl.c +++ b/dlls/oledlg/pastespl.c @@ -19,7 +19,6 @@ */
#define COBJMACROS -#define NONAMELESSUNION
#include <stdarg.h>
@@ -139,7 +138,7 @@ static void get_descriptors(HWND hdlg, ps_struct_t *ps_struct) fmtetc.cfFormat = cf_object_descriptor; if(IDataObject_GetData(ps_struct->ps->lpSrcDataObj, &fmtetc, &stg) == S_OK) { - OBJECTDESCRIPTOR *obj_desc = GlobalLock(stg.u.hGlobal); + OBJECTDESCRIPTOR *obj_desc = GlobalLock(stg.hGlobal); if(obj_desc->dwSrcOfCopy) ps_struct->source_name = wcsdup((WCHAR*)((char*)obj_desc + obj_desc->dwSrcOfCopy)); if(obj_desc->dwFullUserTypeName) @@ -147,8 +146,8 @@ static void get_descriptors(HWND hdlg, ps_struct_t *ps_struct) OleRegGetUserType(&obj_desc->clsid, USERCLASSTYPE_APPNAME, &ps_struct->app_name); /* Get the icon here. If dwDrawAspect & DVASCPECT_ICON call GetData(CF_METAFILEPICT), otherwise native calls OleGetIconFromClass(obj_desc->clsid) */ - GlobalUnlock(stg.u.hGlobal); - GlobalFree(stg.u.hGlobal); + GlobalUnlock(stg.hGlobal); + GlobalFree(stg.hGlobal); } else { @@ -158,13 +157,13 @@ static void get_descriptors(HWND hdlg, ps_struct_t *ps_struct) fmtetc.cfFormat = cf_link_src_descriptor; if(IDataObject_GetData(ps_struct->ps->lpSrcDataObj, &fmtetc, &stg) == S_OK) { - OBJECTDESCRIPTOR *obj_desc = GlobalLock(stg.u.hGlobal); + OBJECTDESCRIPTOR *obj_desc = GlobalLock(stg.hGlobal); if(obj_desc->dwSrcOfCopy) ps_struct->link_source_name = wcsdup((WCHAR*)((char*)obj_desc + obj_desc->dwSrcOfCopy)); if(obj_desc->dwFullUserTypeName) ps_struct->link_type_name = wcsdup((WCHAR*)((char*)obj_desc + obj_desc->dwFullUserTypeName)); - GlobalUnlock(stg.u.hGlobal); - GlobalFree(stg.u.hGlobal); + GlobalUnlock(stg.hGlobal); + GlobalFree(stg.hGlobal); }
if(ps_struct->source_name == NULL && ps_struct->link_source_name == NULL)