mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-24 03:31:07 +00:00
Unconditionally call __gconv_get_path when reading iconv configuration
__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.
This commit is contained in:
parent
bd3b0fbae3
commit
6d6ee04622
@ -1,3 +1,8 @@
|
||||
2018-11-05 Arjun Shankar <arjun@redhat.com>
|
||||
|
||||
* iconv/gconv_conf.c (__gconv_read_conf): Remove NULL check for
|
||||
__gconv_path_elem and call __gconv_get_path unconditionally.
|
||||
|
||||
2018-11-05 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
[BZ #22927]
|
||||
|
@ -552,8 +552,7 @@ __gconv_read_conf (void)
|
||||
|
||||
#ifndef STATIC_GCONV
|
||||
/* Find out where we have to look. */
|
||||
if (__gconv_path_elem == NULL)
|
||||
__gconv_get_path ();
|
||||
__gconv_get_path ();
|
||||
|
||||
for (cnt = 0; __gconv_path_elem[cnt].name != NULL; ++cnt)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user