[PATCH] gconv: Replace norm_add_slashes with __gconv_norm_add_slashes
Florian Weimer
fweimer@redhat.com
Mon Jun 19 22:17:00 GMT 2017
On 06/19/2017 11:38 PM, Adhemerval Zanella wrote:
> I think this is a good candidate for char_array usage [1]:
>
> #define CHAR_ARRAY_INITIAL_SIZE 0
> #include <malloc/char_array-skeleton.c>
> [â¦]
Hmm, I'll review your latest char_array patch, then. But if we have
multiple users, we should think about out-lining more of the code.
I believe Arjun may also need a variant of this function
(norm_add_slashes) for his iconv -c fix.
>> + if (charset == NULL || outcharset == NULL)
>> + {
>> + free ((char *) encoding);
>
> No need to cast on free.
encoding is a const char *.
> In fact these seems another place where a char_array could find some use
> to avoid all the boilerplate of managing buffers size to appendages and
> buffer management (and we could get some speed up by using the stack as
> well).
But we can realistically make such far-reaching changes only after
eliminating the conditional compilation, and that's not something I want
to do in this patch.
Thanks,
Florian
More information about the Libc-alpha
mailing list