summaryrefslogtreecommitdiff
path: root/proc
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-05-03 18:11:46 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-04 00:23:58 +0200
commit717897ca40be3bb78130617c8e880137eff96d96 (patch)
treeae59f7ddfced97e8020ab7af0117a49b17ddaa75 /proc
parent9bbcc8265a062572e19dc18d679948ebbe892419 (diff)
Use designated initializers when building mach_msg_type_t
Message-Id: <ZFLcIs0iwiC9kQDf@jupiter.tail36e24.ts.net>
Diffstat (limited to 'proc')
-rw-r--r--proc/stubs.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/proc/stubs.c b/proc/stubs.c
index 50882418..ea0ae7a6 100644
--- a/proc/stubs.c
+++ b/proc/stubs.c
@@ -85,52 +85,52 @@ send_signal (mach_port_t msgport,
so we cannot safely use a shared static buffer. */
struct msg_sig_post_request message =
{
- {
+ .head = {
/* Message header: */
- (MACH_MSGH_BITS_COMPLEX
+ .msgh_bits = (MACH_MSGH_BITS_COMPLEX
| MACH_MSGH_BITS (MACH_MSG_TYPE_COPY_SEND,
- MACH_MSG_TYPE_MAKE_SEND_ONCE)), /* msgh_bits */
- sizeof message, /* msgh_size */
- msgport, /* msgh_remote_port */
- { MACH_PORT_NULL }, /* msgh_local_port */
- 0, /* msgh_seqno */
- RPCID_SIG_POST, /* msgh_id */
+ MACH_MSG_TYPE_MAKE_SEND_ONCE)),
+ .msgh_size = sizeof message,
+ .msgh_remote_port = msgport,
+ .msgh_local_port = MACH_PORT_NULL,
+ .msgh_seqno = 0,
+ .msgh_id = RPCID_SIG_POST,
},
- {
+ .signaltype = {
/* Type descriptor for signo */
- MACH_MSG_TYPE_INTEGER_32, /* msgt_name */
- 32, /* msgt_size */
- 1, /* msgt_number */
- 1, /* msgt_inline */
- 0, /* msgt_longform */
- 0, /* msgt_deallocate */
- 0, /* msgt_unused */
+ .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
},
/* Signal number */
- signal,
+ .signal = signal,
/* Type descriptor for sigcode */
- {
- MACH_MSG_TYPE_INTEGER_32, /* msgt_name */
- 32, /* msgt_size */
- 1, /* msgt_number */
- 1, /* msgt_inline */
- 0, /* msgt_longform */
- 0, /* msgt_deallocate */
- 0, /* msgt_unused */
+ .sigcode_type = {
+ .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
},
/* Sigcode */
- sigcode,
- {
+ .sigcode = sigcode,
+ .refporttype = {
/* Type descriptor for refport */
- MACH_MSG_TYPE_COPY_SEND, /* msgt_name */
- 32, /* msgt_size */
- 1, /* msgt_number */
- 1, /* msgt_inline */
- 0, /* msgt_longform */
- 0, /* msgt_deallocate */
- 0, /* msgt_unused */
+ .msgt_name = MACH_MSG_TYPE_COPY_SEND,
+ .msgt_size = 32,
+ .msgt_number = 1,
+ .msgt_inline = TRUE,
+ .msgt_longform = FALSE,
+ .msgt_deallocate = FALSE,
+ .msgt_unused = 0
},
- refport
+ .refport = refport
};
err = mach_msg ((mach_msg_header_t *)&message,