[libvirt] [PATCH] build: simplify xmlFreeNode usage
Eric Blake
eblake at redhat.com
Wed Jan 25 00:17:38 UTC 2012
Noticed while reviewing the previous patch; thankfully, there
are no violations.
* cfg.mk (useless_free_options): Add xmlFreeNode.
---
> > + if (def->metadata)
> > + xmlFreeNode(def->metadata);
> Useless use of if before free, since xmlFreeNode is documented as a
> no-op on NULL. I'll update our list of function names to include
> xmlFreeNode(), so that 'make syntax-check' will prevent this in the
> future, as a followup patch.
Pushing under the trivial rule.
cfg.mk | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 20a085e..d853caf 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -171,6 +171,7 @@ useless_free_options = \
--name=xmlBufferFree \
--name=xmlFree \
--name=xmlFreeDoc \
+ --name=xmlFreeNode \
--name=xmlXPathFreeContext \
--name=xmlXPathFreeObject
--
1.7.7.5
More information about the libvir-list
mailing list