From 67e5e8edf6aee9599cde3d037f443257fd07f5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Tue, 22 Dec 2015 19:29:16 +0100 Subject: [PATCH] services: Fix access adjustment by reordering code (Clang). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Hentschel Signed-off-by: Alexandre Julliard --- programs/services/rpc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/services/rpc.c b/programs/services/rpc.c index 89a8c91e54d..dd44965142c 100644 --- a/programs/services/rpc.c +++ b/programs/services/rpc.c @@ -352,12 +352,13 @@ static DWORD create_handle_for_service(struct service_entry *entry, DWORD dwDesi return ERROR_NOT_ENOUGH_SERVER_MEMORY; } + if (dwDesiredAccess & MAXIMUM_ALLOWED) + dwDesiredAccess |= SERVICE_ALL_ACCESS; + service->hdr.type = SC_HTYPE_SERVICE; service->hdr.access = dwDesiredAccess; RtlMapGenericMask(&service->hdr.access, &g_svc_generic); service->service_entry = entry; - if (dwDesiredAccess & MAXIMUM_ALLOWED) - dwDesiredAccess |= SERVICE_ALL_ACCESS; *phService = &service->hdr; return ERROR_SUCCESS;