locale/programs/locarchive.c: Remove unnecessary check in add_locale_archive
authorFrédéric Bérat <fberat@redhat.com>
Wed, 26 Apr 2023 12:30:58 +0000 (08:30 -0400)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 26 Apr 2023 12:32:14 +0000 (08:32 -0400)
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>
locale/programs/locarchive.c

index 87d2d9b..8d7d51a 100644 (file)
@@ -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.  */