[libvirt] [PATCH v2 07/16] numatune: Encapsulate numatune configuration in order to unify results

Eric Blake eblake at redhat.com
Tue Jul 15 16:52:38 UTC 2014


On 07/15/2014 02:44 AM, Michal Privoznik wrote:

>>
>> I take the 'const' as a sign of the fact that I won't be modifying
>> any part of the string.  Just adding 'const' to a pointer should be
>> perfectly OK, but I have not objections to your idea, so I squashed
>> this in:
> 
> Well, I look at free()-ing as modification of the pointee. Therefore
> freeing a const pointer is in fact its modification and hence should be
> rejected.

I agree.

> It's just that our VIR_FREE throws away the const-ness of
> passed pointers. Maybe (as completely separate patchset) we may fix the
> VIR_FREE() macro which is obviously const-incorrect.

That's due to the number of legacy callers that were already
const-incorrect at the time I beefed up VIR_FREE months ago to be more
type-safe.  But now that the tree is a lot cleaner, I'm in favor of such
a cleanup (I see you already started it, but I had more comments in that
thread, and now I'm on the hook to provide a v2...).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140715/ff165c4b/attachment-0001.sig>


More information about the libvir-list mailing list