public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
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	[thread overview]
Message-ID: <20200709235848.3496713-2-keithp@keithp.com> (raw)
In-Reply-To: <20200709235848.3496713-1-keithp@keithp.com>

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 <keithp@keithp.com>
---
 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


  reply	other threads:[~2020-07-09 23:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 23:58 [PATCH 1/4] libc/iconv: Detect CES handler loading failure Keith Packard
2020-07-09 23:58 ` Keith Packard [this message]
2020-07-09 23:58 ` [PATCH 3/4] libc/iconv: find_alias was mis-computing remaining alias table length Keith Packard
2020-07-09 23:58 ` [PATCH 4/4] testsuite: Fix iconv tests to use new encoding config defines Keith Packard
2020-07-10 10:05 ` [PATCH 1/4] libc/iconv: Detect CES handler loading failure Corinna Vinschen
2020-07-11  0:26   ` Keith Packard

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=20200709235848.3496713-2-keithp@keithp.com \
    --to=keithp@keithp.com \
    --cc=newlib@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).