From a4b07324516e48dd4dab69219dd8a61ed88c51ec Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 23 Mar 2021 00:31:13 +0100 Subject: [PATCH] services: Use nameless unions. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- programs/services/Makefile.in | 1 - programs/services/rpc.c | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/programs/services/Makefile.in b/programs/services/Makefile.in index 46d4c820a9e..560e277a9bf 100644 --- a/programs/services/Makefile.in +++ b/programs/services/Makefile.in @@ -1,6 +1,5 @@ MODULE = services.exe IMPORTS = rpcrt4 advapi32 userenv setupapi -EXTRADEFS = -DWINE_NO_NAMELESS_EXTENSION EXTRADLLFLAGS = -mconsole -mno-cygwin diff --git a/programs/services/rpc.c b/programs/services/rpc.c index d0f85024191..df69a741b51 100644 --- a/programs/services/rpc.c +++ b/programs/services/rpc.c @@ -859,7 +859,7 @@ static void fill_notify(struct sc_notify_handle *notify, struct service_entry *s list->cElements = 1; list->NotifyParamsArray[0].dwInfoLevel = 2; - list->NotifyParamsArray[0].u.params = cparams; + list->NotifyParamsArray[0].params = cparams; InterlockedExchangePointer((void**)¬ify->params_list, list); @@ -934,12 +934,12 @@ DWORD __cdecl svcctl_ChangeServiceConfig2W( SC_RPC_HANDLE hService, SC_RPC_CONFI { WCHAR *descr = NULL; - if (!config.u.descr->lpDescription) + if (!config.descr->lpDescription) break; - if (config.u.descr->lpDescription[0]) + if (config.descr->lpDescription[0]) { - if (!(descr = strdupW( config.u.descr->lpDescription ))) + if (!(descr = strdupW( config.descr->lpDescription ))) return ERROR_NOT_ENOUGH_MEMORY; } @@ -953,15 +953,15 @@ DWORD __cdecl svcctl_ChangeServiceConfig2W( SC_RPC_HANDLE hService, SC_RPC_CONFI break; case SERVICE_CONFIG_FAILURE_ACTIONS: WINE_FIXME( "SERVICE_CONFIG_FAILURE_ACTIONS not implemented: period %u msg %s cmd %s\n", - config.u.actions->dwResetPeriod, - wine_dbgstr_w(config.u.actions->lpRebootMsg), - wine_dbgstr_w(config.u.actions->lpCommand) ); + config.actions->dwResetPeriod, + wine_dbgstr_w(config.actions->lpRebootMsg), + wine_dbgstr_w(config.actions->lpCommand) ); break; case SERVICE_CONFIG_PRESHUTDOWN_INFO: WINE_TRACE( "changing service %p preshutdown timeout to %d\n", - service, config.u.preshutdown->dwPreshutdownTimeout ); + service, config.preshutdown->dwPreshutdownTimeout ); service_lock( service->service_entry ); - service->service_entry->preshutdown_timeout = config.u.preshutdown->dwPreshutdownTimeout; + service->service_entry->preshutdown_timeout = config.preshutdown->dwPreshutdownTimeout; save_service_config( service->service_entry ); service_unlock( service->service_entry ); break; @@ -1682,7 +1682,7 @@ DWORD __cdecl svcctl_NotifyServiceStatusChange( struct sc_handle *hdr = handle; WINE_TRACE("(%p, NotifyMask: 0x%x, %p, %p, %p, %p)\n", handle, - params.u.params->dwNotifyMask, clientprocessguid, scmprocessguid, + params.params->dwNotifyMask, clientprocessguid, scmprocessguid, createremotequeue, hNotify); switch (hdr->type) @@ -1716,7 +1716,7 @@ DWORD __cdecl svcctl_NotifyServiceStatusChange( notify->event = CreateEventW(NULL, TRUE, FALSE, NULL); - notify->notify_mask = params.u.params->dwNotifyMask; + notify->notify_mask = params.params->dwNotifyMask; service_lock(service->service_entry);