This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] nscd: Deallocate existing user names in file parser
- From: DJ Delorie <dj at redhat dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 13 Aug 2018 16:22:52 -0400
- Subject: Re: [PATCH] nscd: Deallocate existing user names in file parser
Florian Weimer <firstname.lastname@example.org> writes:
>> Note that free() nominally takes a void*, not a char*. I think we
>> should use void* in this case.
> My idea was to make clear that I'm casting away const here (similar to
> C++'s const_cast).
Two comments then:
1. A suitable comment would have make it clearer :-)
2. Why are those variables const in the first place? They're only ever
assigned values from xstrdup(), which isn't const.