On 05/17/2010 02:51 PM, Jim Meyering wrote:
>>> Is this something that the useless-if-before-free test
could have
>>> caught, rather than waiting for coverity?
>>
>> Very good idea.
>> Here's a patch to do that.
Here's a complete patch:
>From 59d7134bc925de86b807262896a76256b889c96a Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Mon, 17 May 2010 22:38:59 +0200
Subject: [PATCH] maint: add more free-like functions to the list and deal with fallout
* cfg.mk (useless_free_options): Add many vir*Free* function names,
and then remove the useless if-before-free tests exposed by running
make syntax-check.
Looks sane.
+useless_free_options = \
+ --name=VIR_FREE \
...
+# The following template was generated by this command:
+# make ID && aid free|grep '^vi'|sed 's/ .*//;s/^/# /'
+# N virBufferFreeAndReset
+# y virCPUDefFree
Especially nice, along with the documentation of potential future
cleanup projects.
ACK.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org