From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from elaine.keithp.com (home.keithp.com [63.227.221.253]) by sourceware.org (Postfix) with ESMTPS id ABE893861970 for ; Thu, 9 Jul 2020 23:59:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ABE893861970 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 9050F3F2CDC9 for ; Thu, 9 Jul 2020 16:59:04 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from elaine.keithp.com ([127.0.0.1]) by localhost (elaine.keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ErZ2OQQqxDXQ; Thu, 9 Jul 2020 16:59:04 -0700 (PDT) Received: from keithp.com (67-40-10-69.tukw.qwest.net [67.40.10.69]) by elaine.keithp.com (Postfix) with ESMTPSA id 359003F2CDC6; Thu, 9 Jul 2020 16:59:04 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1000) id 8B7BA1582164; Thu, 9 Jul 2020 16:58:55 -0700 (PDT) From: Keith Packard To: newlib@sourceware.org Subject: [PATCH 2/4] libc/iconv: Remove unneeded pointer var for _iconv_aliases Date: Thu, 9 Jul 2020 16:58:46 -0700 Message-Id: <20200709235848.3496713-2-keithp@keithp.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200709235848.3496713-1-keithp@keithp.com> References: <20200709235848.3496713-1-keithp@keithp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 23:59:07 -0000 The pointer value for the iconv alias data never changes, so get rid of the pointer and make it an array instead. Signed-off-by: Keith Packard --- newlib/libc/iconv/lib/aliasesbi.c | 5 ++--- newlib/libc/iconv/lib/local.h | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/newlib/libc/iconv/lib/aliasesbi.c b/newlib/libc/iconv/lib/aliasesbi.c index dfd7090d0..83b6fd003 100644 --- a/newlib/libc/iconv/lib/aliasesbi.c +++ b/newlib/libc/iconv/lib/aliasesbi.c @@ -5,8 +5,8 @@ #include <_ansi.h> #include "encnames.h" -const char * -_iconv_aliases = +const char +_iconv_aliases[] = { #if defined (_ICONV_FROM_ENCODING_BIG5) \ || defined (_ICONV_TO_ENCODING_BIG5) @@ -210,4 +210,3 @@ _iconv_aliases = #endif "" }; - diff --git a/newlib/libc/iconv/lib/local.h b/newlib/libc/iconv/lib/local.h index bd9dcddca..2d3a16969 100644 --- a/newlib/libc/iconv/lib/local.h +++ b/newlib/libc/iconv/lib/local.h @@ -57,10 +57,8 @@ typedef __uint16_t ucs2_t; /* 32-bit UCS-4 type */ typedef __uint32_t ucs4_t; - /* The list of built-in encoding names and aliases */ -extern const char * -_iconv_aliases; +extern const char _iconv_aliases[]; #endif /* !__ICONV_LIB_LOCAL_H__ */ -- 2.27.0