bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH mig] Use designated initializers for mach_msg_type_t and mach


From: Samuel Thibault
Subject: Re: [PATCH mig] Use designated initializers for mach_msg_type_t and mach_msg_type_long_t.
Date: Wed, 8 Mar 2023 00:38:03 +0100
User-agent: NeoMutt/20170609 (1.8.3)

Applied, thanks!

Flavio Cruz, le mar. 07 mars 2023 01:57:56 -0500, a ecrit:
> ---
>  utils.c | 52 ++++++++++++++++++++++++++--------------------------
>  1 file changed, 26 insertions(+), 26 deletions(-)
> 
> diff --git a/utils.c b/utils.c
> index 64ab496..6d6bb9e 100644
> --- a/utils.c
> +++ b/utils.c
> @@ -263,15 +263,15 @@ WriteCheckDecl(FILE *file, const argument_t *arg)
>  
>      fprintf(file, "\tconst mach_msg_type_t %sCheck = {\n",
>           arg->argVarName);
> -    fprintf(file, "\t\t/* msgt_name = */\t\t(unsigned char) %s,\n", 
> it->itOutNameStr);
> -    fprintf(file, "\t\t/* msgt_size = */\t\t%d,\n", it->itSize);
> -    fprintf(file, "\t\t/* msgt_number = */\t\t%d,\n", it->itNumber);
> -    fprintf(file, "\t\t/* msgt_inline = */\t\t%s,\n",
> +    fprintf(file, "\t\t.msgt_name =\t\t(unsigned char) %s,\n", 
> it->itOutNameStr);
> +    fprintf(file, "\t\t.msgt_size =\t\t%d,\n", it->itSize);
> +    fprintf(file, "\t\t.msgt_number =\t\t%d,\n", it->itNumber);
> +    fprintf(file, "\t\t.msgt_inline =\t\t%s,\n",
>           strbool(it->itInLine));
> -    fprintf(file, "\t\t/* msgt_longform = */\t\tFALSE,\n");
> -    fprintf(file, "\t\t/* msgt_deallocate = */\t\t%s,\n",
> +    fprintf(file, "\t\t.msgt_longform =\t\tFALSE,\n");
> +    fprintf(file, "\t\t.msgt_deallocate =\t\t%s,\n",
>           strbool(!it->itInLine));
> -    fprintf(file, "\t\t/* msgt_unused = */\t\t0\n");
> +    fprintf(file, "\t\t.msgt_unused =\t\t0\n");
>      fprintf(file, "\t};\n");
>  }
>  
> @@ -359,21 +359,21 @@ WriteStaticLongDecl(FILE *file, const ipc_type_t *it,
>                   dealloc_t dealloc, bool inname, identifier_t name)
>  {
>      fprintf(file, "\tconst mach_msg_type_long_t %s = {\n", name);
> -    fprintf(file, "\t{\n");
> -    fprintf(file, "\t\t/* msgt_name = */\t\t0,\n");
> -    fprintf(file, "\t\t/* msgt_size = */\t\t0,\n");
> -    fprintf(file, "\t\t/* msgt_number = */\t\t0,\n");
> -    fprintf(file, "\t\t/* msgt_inline = */\t\t%s,\n",
> +    fprintf(file, "\t\t.msgtl_header = {\n");
> +    fprintf(file, "\t\t\t.msgt_name =\t\t0,\n");
> +    fprintf(file, "\t\t\t.msgt_size =\t\t0,\n");
> +    fprintf(file, "\t\t\t.msgt_number =\t\t0,\n");
> +    fprintf(file, "\t\t\t.msgt_inline =\t\t%s,\n",
>           strbool(it->itInLine));
> -    fprintf(file, "\t\t/* msgt_longform = */\t\tTRUE,\n");
> -    fprintf(file, "\t\t/* msgt_deallocate = */\t\t%s,\n",
> +    fprintf(file, "\t\t\t.msgt_longform =\t\tTRUE,\n");
> +    fprintf(file, "\t\t\t.msgt_deallocate =\t\t%s,\n",
>           strdealloc(dealloc));
> -    fprintf(file, "\t\t/* msgt_unused = */\t\t0\n");
> -    fprintf(file, "\t},\n");
> -    fprintf(file, "\t\t/* msgtl_name = */\t(unsigned short) %s,\n",
> +    fprintf(file, "\t\t\t.msgt_unused =\t\t0\n");
> +    fprintf(file, "\t\t},\n");
> +    fprintf(file, "\t\t.msgtl_name =\t(unsigned short) %s,\n",
>           inname ? it->itInNameStr : it->itOutNameStr);
> -    fprintf(file, "\t\t/* msgtl_size = */\t%d,\n", it->itSize);
> -    fprintf(file, "\t\t/* msgtl_number = */\t%d,\n", it->itNumber);
> +    fprintf(file, "\t\t.msgtl_size =\t%d,\n", it->itSize);
> +    fprintf(file, "\t\t.msgtl_number =\t%d,\n", it->itNumber);
>      fprintf(file, "\t};\n");
>  }
>  
> @@ -383,16 +383,16 @@ WriteStaticShortDecl(FILE *file, const ipc_type_t *it,
>                    identifier_t name)
>  {
>      fprintf(file, "\tconst mach_msg_type_t %s = {\n", name);
> -    fprintf(file, "\t\t/* msgt_name = */\t\t(unsigned char) %s,\n",
> +    fprintf(file, "\t\t.msgt_name =\t\t(unsigned char) %s,\n",
>           inname ? it->itInNameStr : it->itOutNameStr);
> -    fprintf(file, "\t\t/* msgt_size = */\t\t%d,\n", it->itSize);
> -    fprintf(file, "\t\t/* msgt_number = */\t\t%d,\n", it->itNumber);
> -    fprintf(file, "\t\t/* msgt_inline = */\t\t%s,\n",
> +    fprintf(file, "\t\t.msgt_size =\t\t%d,\n", it->itSize);
> +    fprintf(file, "\t\t.msgt_number =\t\t%d,\n", it->itNumber);
> +    fprintf(file, "\t\t.msgt_inline =\t\t%s,\n",
>           strbool(it->itInLine));
> -    fprintf(file, "\t\t/* msgt_longform = */\t\tFALSE,\n");
> -    fprintf(file, "\t\t/* msgt_deallocate = */\t\t%s,\n",
> +    fprintf(file, "\t\t.msgt_longform =\t\tFALSE,\n");
> +    fprintf(file, "\t\t.msgt_deallocate =\t\t%s,\n",
>           strdealloc(dealloc));
> -    fprintf(file, "\t\t/* msgt_unused = */\t\t0\n");
> +    fprintf(file, "\t\t.msgt_unused =\t\t0\n");
>      fprintf(file, "\t};\n");
>      if (it->itInLine && !it->itVarArray) {
>          identifier_t type = is_server ? FetchServerType(it) : 
> FetchUserType(it);
> -- 
> 2.39.2
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'√Čvaluation de l'Inria.



reply via email to

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