public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] locale/programs/locarchive.c: Remove unnecessary check in add_locale_archive
@ 2023-04-26 12:32 Siddhesh Poyarekar
  0 siblings, 0 replies; only message in thread
From: Siddhesh Poyarekar @ 2023-04-26 12:32 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a9f806d4532de2c9124c6caaae88b53ea56cdddd

commit a9f806d4532de2c9124c6caaae88b53ea56cdddd
Author: Frédéric Bérat <fberat@redhat.com>
Date:   Wed Apr 26 08:30:58 2023 -0400

    locale/programs/locarchive.c: Remove unnecessary check in add_locale_archive
    
    Since asprintf is called "if (mask & XPG_NORM_CODESET)" there is no
    point in checking the mask again within the asprintf call.
    
    Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

Diff:
---
 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 87d2d9b1b2..8d7d51af6c 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.  */
     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 ?: "");
 
   /* This call does the main work.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-26 12:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-26 12:32 [glibc] locale/programs/locarchive.c: Remove unnecessary check in add_locale_archive Siddhesh Poyarekar

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).