[PATCH v2] Remove unnecessary locking when reading iconv configuration [BZ #22062]

Florian Weimer fweimer@redhat.com
Wed Oct 17 09:28:00 GMT 2018


* Arjun Shankar:

> 2018-10-16  Arjun Shankar  <arjun@redhat.com>
>
> 	[BZ #22062]
> 	* iconv/gconv_conf.c (__gconv_get_path): Remove locking and fix
> 	indentation.
> 	* (__gconv_read_conf): Mark function static.
> 	* (once): New static variable.
> 	* (__gconv_load_conf): New function.
> 	* iconv/gconv_int.h (__gconv_load_conf): Likewise.
> 	* iconv/gconv_db.c (once): Remove static variable.
> 	* (__gconv_compare_alias): Use __gconv_load_conf instead of
> 	__gconv_read_conf.
> 	* (__gconv_find_transform): Likewise.
> 	* iconv/tst-iconv-mt.c: New test.
> 	* iconv/Makefile: Add tst-iconv-mt.

Looks good to me.  The handling of the result variable in
__gconv_get_path is a bit awkward, but I think we should not clean this
up in this patch.  There are other issues in this function (the buffer
management, the lack of error reporting).

Please commit this to master.

Thanks,
Florian



More information about the Libc-alpha mailing list