This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Unconditionally call __gconv_get_path when reading iconv configuration
- From: Florian Weimer <fweimer at redhat dot com>
- To: Arjun Shankar <arjun dot is at lostca dot se>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 05 Nov 2018 12:46:21 +0100
- Subject: Re: [PATCH] Unconditionally call __gconv_get_path when reading iconv configuration
- References: <20181101160235.GA90664@aloka.lostca.se>
* Arjun Shankar:
> __gconv_read_conf is only ever called once during the program's lifetime.
> This means that __gconv_path_elem is always uninitialized when the function
> begins executing. __gconv_get_path has an assert to ensure that this
> expected runtime behaviour is always exhibited. Given this, checking for a
> NULL value before calling __gconv_get_path is unnecessary. This commit
> drops the condition and calls __gconv_get_path unconditionally.
> 2018-11-01 Arjun Shankar <firstname.lastname@example.org>
> * iconv/gconv_conf.c (__gconv_read_conf): Remove NULL check for
> __gconv_path_elem and call __gconv_get_path unconditionally.
This is okay.