This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] iconv: Use __twalk_r in __gconv_release_shlib
- From: Florian Weimer <fweimer at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 04 Jun 2019 14:23:53 +0200
- Subject: Re: [PATCH] iconv: Use __twalk_r in __gconv_release_shlib
- References: <87y33pvzu8.fsf@oldenburg2.str.redhat.com> <mvma7ex8sud.fsf@suse.de>
* Andreas Schwab:
> On Mai 02 2019, Florian Weimer <fweimer@redhat.com> wrote:
>
>> * iconv/gconv_dl.c (release_handle): Remove file-level definition.
>> (do_release_shlib): Adjust for __twalk_r.
>> (__gconv_release_shlib): Call __twalk_r.
>
> Ok.
>
>> diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c
>> index cf7023a9aa..8379a488ed 100644
>> --- a/iconv/gconv_dl.c
>> +++ b/iconv/gconv_dl.c
>> @@ -149,15 +149,11 @@ __gconv_find_shlib (const char *name)
>> return found;
>> }
>>
>> -
>> -/* This is very ugly but the tsearch functions provide no way to pass
>> - information to the walker function. So we use a global variable.
>> - It is MT safe since we use a lock. */
>> -static struct __gconv_loaded_object *release_handle;
>> -
>> static void
>> -do_release_shlib (void *nodep, VISIT value, int level)
>> +do_release_shlib (const void *nodep, VISIT value, void *closure)
>> {
>> +
>> + struct __gconv_loaded_object *release_handle = closure;
>
> Extra empty line.
Thanks, pushed with that change.
Florian