bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH gnumach] Use designated initializers in kern/ipc_kobject.c


From: Flavio Cruz
Subject: [PATCH gnumach] Use designated initializers in kern/ipc_kobject.c
Date: Thu, 4 May 2023 00:37:04 -0400

msgt_deallocate was not initialized explicitly, this fixes that too.
---
 kern/ipc_kobject.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/kern/ipc_kobject.c b/kern/ipc_kobject.c
index a0feaf40..960ef892 100644
--- a/kern/ipc_kobject.c
+++ b/kern/ipc_kobject.c
@@ -101,13 +101,14 @@ ipc_kobject_server(ipc_kmsg_t request)
 #define        InP     ((mach_msg_header_t *) &request->ikm_header)
 #define        OutP    ((mig_reply_header_t *) &reply->ikm_header)
 
-           static mach_msg_type_t RetCodeType = {
-               /* msgt_name = */               MACH_MSG_TYPE_INTEGER_32,
-               /* msgt_size = */               32,
-               /* msgt_number = */             1,
-               /* msgt_inline = */             TRUE,
-               /* msgt_longform = */           FALSE,
-               /* msgt_unused = */             0
+           static const mach_msg_type_t RetCodeType = {
+               .msgt_name = MACH_MSG_TYPE_INTEGER_32,
+               .msgt_size = 32,
+               .msgt_number = 1,
+               .msgt_inline = TRUE,
+               .msgt_longform = FALSE,
+               .msgt_deallocate = FALSE,
+               .msgt_unused = 0
            };
            OutP->Head.msgh_bits =
                MACH_MSGH_BITS(MACH_MSGH_BITS_LOCAL(InP->msgh_bits), 0);
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]