[PATCH] manual: tidy the longopt.c example
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu Mar 27 15:40:54 GMT 2025
On 25/03/25 05:00, Samuel Zeter wrote:
> - Change longopt.c's backticks to single quotes
I think these are intentional, but the change look okay to me.
> - puts() does not use format specifiers
LGTM, thanks.
> ---
> manual/examples/longopt.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/manual/examples/longopt.c b/manual/examples/longopt.c
> index c679cd27c3..bf3857b9b1 100644
> --- a/manual/examples/longopt.c
> +++ b/manual/examples/longopt.c
> @@ -66,23 +66,23 @@ main (int argc, char **argv)
> break;
>
> case 'a':
> - puts ("option -a\n");
> + puts ("option -a");
> break;
>
> case 'b':
> - puts ("option -b\n");
> + puts ("option -b");
> break;
>
> case 'c':
> - printf ("option -c with value `%s'\n", optarg);
> + printf ("option -c with value '%s'\n", optarg);
> break;
>
> case 'd':
> - printf ("option -d with value `%s'\n", optarg);
> + printf ("option -d with value '%s'\n", optarg);
> break;
>
> case 'f':
> - printf ("option -f with value `%s'\n", optarg);
> + printf ("option -f with value '%s'\n", optarg);
> break;
>
> case '?':
More information about the Libc-alpha
mailing list