[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH incubator/dde] Use designated initializers when defining mach
From: |
Samuel Thibault |
Subject: |
Re: [PATCH incubator/dde] Use designated initializers when defining mach_msg_type_t in libmachdevdde |
Date: |
Sat, 12 Aug 2023 13:54:24 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Applied, thanks!
Flavio Cruz, le ven. 11 août 2023 00:49:29 -0400, a ecrit:
> This avoids assuming a specific field order in mach_msg_type_t (see
> https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/device/net_io.c?id=50b744c4c2877dfbec54dc7bdae0d141e34c17c3
> for a similar change in gnumach).
> ---
> libmachdevdde/net.c | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/libmachdevdde/net.c b/libmachdevdde/net.c
> index 193421160..25c08cd35 100644
> --- a/libmachdevdde/net.c
> +++ b/libmachdevdde/net.c
> @@ -105,23 +105,23 @@ static struct machdev_device_emulation_ops
> linux_net_emulation_ops;
>
> static mach_msg_type_t header_type =
> {
> - MACH_MSG_TYPE_BYTE,
> - 8,
> - NET_HDW_HDR_MAX,
> - TRUE,
> - FALSE,
> - FALSE,
> - 0
> + .msgt_name = MACH_MSG_TYPE_BYTE,
> + .msgt_size = 8,
> + .msgt_number = NET_HDW_HDR_MAX,
> + .msgt_inline = TRUE,
> + .msgt_longform = FALSE,
> + .msgt_deallocate = FALSE,
> + .msgt_unused = 0
> };
>
> static mach_msg_type_t packet_type =
> {
> - MACH_MSG_TYPE_BYTE, /* name */
> - 8, /* size */
> - 0, /* number */
> - TRUE, /* inline */
> - FALSE, /* longform */
> - FALSE /* deallocate */
> + .msgt_name = MACH_MSG_TYPE_BYTE,
> + .msgt_size = 8,
> + .msgt_number = 0,
> + .msgt_inline = TRUE,
> + .msgt_longform = FALSE,
> + .msgt_deallocate = FALSE
> };
>
> static struct net_data *search_nd (struct net_device *dev)
> --
> 2.39.2
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.