]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: syntax check to avoid 'const fooPtr'
authorEric Blake <eblake@redhat.com>
Tue, 24 Sep 2013 16:41:54 +0000 (10:41 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 14 Oct 2013 20:37:26 +0000 (14:37 -0600)
commite79810162ad44df1d69fd9ba188111c3fc9c8b64
treea6c5e37799bc3cdf63b2397988aa8683183d1c0a
parent33aec50684424f42552475f9f59c991f07b8d12b
build: syntax check to avoid 'const fooPtr'

'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.

Signed-off-by: Eric Blake <eblake@redhat.com>
cfg.mk