coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] mkfifo, mknod: avoid duplicate quoting in error diagnostic


From: Pádraig Brady
Subject: Re: [PATCH] mkfifo, mknod: avoid duplicate quoting in error diagnostic
Date: Tue, 03 Dec 2013 00:18:08 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 12/02/2013 11:41 PM, Bernhard Voelker wrote:
> 
>>From 896554fd01d217ad4d823d883606377cb6d76124 Mon Sep 17 00:00:00 2001
> From: Bernhard Voelker <address@hidden>
> Date: Tue, 3 Dec 2013 00:38:15 +0100
> Subject: [PATCH] maint: avoid '%s' quoting notation in diagnostic messages
> 
> Add a new rule to ensure the use of quote() instead of '%s' or `%s'
> in format strings of diagnostics messages.
> 
> * cfg.mk (sc_prohibit_quotes_notation): Add rule.
> * TODO: Remove the entry regarding the '%s' notation.

Wasn't even aware of that entry :)

>    devmsg ("format String:\n  input: %s\n  grouping: %s\n"
>                     "  padding width: %ld\n  alignment: %s\n"
> -                   "  prefix: '%s'\n  suffix: '%s'\n",
> +                   "  prefix: %s\n  suffix: %s\n",
>            quote (fmt), (grouping) ? "yes" : "no",

does this need to be quote_n (0,... ?

>            padding_width,
>            (padding_alignment == MBS_ALIGN_LEFT) ? "Left" : "Right",
> -          format_str_prefix, format_str_suffix);
> +          quote_n (0, format_str_prefix), quote_n (1, format_str_suffix));

and this adjusted accordingly

> @@ -1067,8 +1068,8 @@ parse_human_number (const char *str, long double 
> /*output */ *value,
>    if (ptr && *ptr != '\0')
>      {
>        if (_invalid != inval_ignore)
> -        error (conv_exit_code, 0, _("invalid suffix in input '%s': '%s'"),
> -               str, ptr);
> +        error (conv_exit_code, 0, _("invalid suffix in input %s: %s"),
> +               quote (str), quote (ptr));

do these need to be quote_n?

thanks!
Pádraig.



reply via email to

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