[libvirt] [PATCH 15/15] build: syntax check to avoid 'const fooPtr'

Eric Blake eblake at redhat.com
Mon Oct 14 20:38:12 UTC 2013


On 10/14/2013 09:35 AM, Daniel P. Berrange wrote:
> On Tue, Oct 08, 2013 at 11:29:06AM -0600, Eric Blake wrote:
>> 'const fooPtr' is the same as 'foo * const' (the pointer won't
>> change, but it's contents can).  But in general, if an interface
>> is trying to be const-correct, it should be using 'const foo *'
>> (the pointer is to data that can't be changed).
>>
>> Now that the code base has been cleaned, enforce it with a syntax
>> checker.
>>
>> * cfg.mk (sc_forbid_const_pointer_typedef): New rule.
>> ---
>>  cfg.mk | 8 ++++++++
>>  1 file changed, 8 insertions(+)
> 
> ACK

Thanks; series pushed.

-- 
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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131014/5c636908/attachment-0001.sig>


More information about the libvir-list mailing list