From a9f806d4532de2c9124c6caaae88b53ea56cdddd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rat?= Date: Wed, 26 Apr 2023 08:30:58 -0400 Subject: [PATCH] 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 --- 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 87d2d9b..8d7d51a 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. */ -- 2.7.4