public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: "Frédéric Bérat" <fberat@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] locale/programs/locarchive.c: Remove unnecessary check in add_locale_archive
Date: Wed, 26 Apr 2023 08:12:49 -0400	[thread overview]
Message-ID: <2165c42e-f316-eae8-d26c-87b11ec071fd@gotplt.org> (raw)
In-Reply-To: <20230426121033.921725-1-fberat@redhat.com>

On 2023-04-26 08:10, Frédéric Bérat wrote:
> Since asprintf is called "if (mask & XPG_NORM_CODESET)" there is no point
> in checking the mask again within the asprintf call.
> ---

LGTM.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

>   locale/programs/locarchive.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
> index f8c6f79afa..71fd9f34fa 100644
> --- a/locale/programs/locarchive.c
> +++ b/locale/programs/locarchive.c
> @@ -1156,7 +1156,7 @@ add_locale_to_archive (struct locarhandle *ah, const char *name,
>          We will store it in the archive with a normalized name.  */
>       if (asprintf (&normalized_name, "%s%s%s.%s%s%s",
>   		  language, territory == NULL ? "" : "_", territory ?: "",
> -		  (mask & XPG_NORM_CODESET) ? normalized_codeset : codeset,
> +		  normalized_codeset,
>   		  modifier == NULL ? "" : "@", modifier ?: "") < 0)
>         {
>   	free ((char *) normalized_codeset);

  reply	other threads:[~2023-04-26 12:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26 12:10 Frédéric Bérat
2023-04-26 12:12 ` Siddhesh Poyarekar [this message]
2023-04-26 12:17   ` Siddhesh Poyarekar
2023-04-26 12:23 ` [PATCH v2] " Frédéric Bérat
2023-04-26 12:29   ` Siddhesh Poyarekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2165c42e-f316-eae8-d26c-87b11ec071fd@gotplt.org \
    --to=siddhesh@gotplt.org \
    --cc=fberat@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).