public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>
Cc: libc-alpha@sourceware.org, adhemerval.zanella@linaro.org,
	schwab@linux-m68k.org
Subject: Re: [PATCH 2/6] gconv_conf: Remove unused variables
Date: Mon, 21 Jun 2021 23:23:05 -0400	[thread overview]
Message-ID: <xn8s328twm.fsf@greed.delorie.com> (raw)
In-Reply-To: <20210610111853.2286873-3-siddhesh@sourceware.org>

Siddhesh Poyarekar <siddhesh@sourceware.org> writes:
> The modules and nmodules parameters passed to add_modules, add_alias,
> etc. are not used and are hence unnecessary.  Remove them so that
> their signatures match the functions in iconvconfig.
> ---
>  iconv/gconv_conf.c | 24 ++++++++++--------------
>  1 file changed, 10 insertions(+), 14 deletions(-)
>
> diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
> index 3f2cef255b..6c6625c37a 100644
> --- a/iconv/gconv_conf.c
> +++ b/iconv/gconv_conf.c
> @@ -132,7 +132,7 @@ detect_conflict (const char *alias)
>  
>  /* The actual code to add aliases.  */
>  static void
> -add_alias2 (const char *from, const char *to, const char *wp, void *modules)
> +add_alias2 (const char *from, const char *to, const char *wp)

Drop modules, ok.

> -add_alias (char *rp, void *modules)
> +add_alias (char *rp)

Likewise.  Ok.

> -  add_alias2 (from, to, wp, modules);
> +  add_alias2 (from, to, wp);

Likewise.  Ok.

> @@ -250,8 +250,7 @@ insert_module (struct gconv_module *newp, int tobefreed)
>  
>  /* Add new module.  */
>  static void
> -add_module (char *rp, const char *directory, size_t dir_len, void **modules,
> -	    size_t *nmodules, int modcounter)
> +add_module (char *rp, const char *directory, size_t dir_len, int modcounter)

Likewise, ok.

> -read_conf_file (const char *filename, const char *directory, size_t dir_len,
> -		void **modules, size_t *nmodules)
> +read_conf_file (const char *filename, const char *directory, size_t dir_len)

Likewise, ok.

> -	add_alias (rp, *modules);
> +	add_alias (rp);
>        else if (rp - word == sizeof ("module") - 1
>  	       && memcmp (word, "module", sizeof ("module") - 1) == 0)
> -	add_module (rp, directory, dir_len, modules, nmodules, modcounter++);
> +	add_module (rp, directory, dir_len, modcounter++);

Ok.

>  static void
>  __gconv_read_conf (void)
>  {
> -  void *modules = NULL;
> -  size_t nmodules = 0;

Don't use them, don't need them.  Ok.

> -      read_conf_file (buf, elem, elem_len, &modules, &nmodules);
> +      read_conf_file (buf, elem, elem_len);

Ok.

> -		  read_conf_file (conf, elem, elem_len, &modules, &nmodules);
> +		  read_conf_file (conf, elem, elem_len);

Ok.

> -      add_alias2 (from, to, cp, modules);
> +      add_alias2 (from, to, cp);

Ok.

LGTM.
Reviewed-by: DJ Delorie <dj@redhat.com>


  parent reply	other threads:[~2021-06-22  3:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 11:18 [PATCH 0/6] gconv configuration parsing cleanups Siddhesh Poyarekar
2021-06-10 11:18 ` [PATCH 1/6] iconv: Remove alloca use in gconv-modules configuration parsing Siddhesh Poyarekar
2021-06-22  3:17   ` DJ Delorie
2021-06-10 11:18 ` [PATCH 2/6] gconv_conf: Remove unused variables Siddhesh Poyarekar
2021-06-16 15:28   ` Andreas Schwab
2021-06-22  3:23   ` DJ Delorie [this message]
2021-06-10 11:18 ` [PATCH 3/6] gconv_conf: Split out configuration file processing Siddhesh Poyarekar
2021-06-22  3:48   ` DJ Delorie
2021-06-10 11:18 ` [PATCH 4/6] iconvconfig: Use common gconv module parsing function Siddhesh Poyarekar
2021-06-22  4:01   ` DJ Delorie
2021-07-02  9:11   ` Szabolcs Nagy
2021-07-02  9:27     ` Szabolcs Nagy
2021-06-10 11:18 ` [PATCH 5/6] Handle DT_UNKNOWN in gconv-modules.d Siddhesh Poyarekar
2021-06-22  4:03   ` DJ Delorie
2021-06-10 11:18 ` [PATCH 6/6] Add NEWS item for gconv-modules.d change Siddhesh Poyarekar
2021-06-10 11:37   ` Siddhesh Poyarekar
2021-06-16  4:02 ` [PING][PATCH 0/6] gconv configuration parsing cleanups Siddhesh Poyarekar
2021-06-21  9:14 ` [Ping 2][PATCH " Siddhesh Poyarekar

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=xn8s328twm.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.org \
    --cc=siddhesh@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).