[PATCH] nscd: Deallocate existing user names in file parser

DJ Delorie dj@redhat.com
Mon Aug 13 20:22:00 GMT 2018


Florian Weimer <fw@deneb.enyo.de> 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.



More information about the Libc-alpha mailing list