The returned value is always non-NULL. Callers need to check the lenght
of the returned array instead.

Signed-off-by: Peter Krempa <pkre...@redhat.com>
---
 src/util/virxml.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/util/virxml.c b/src/util/virxml.c
index 670cace4ab..d5c7ebaf22 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -909,6 +909,8 @@ virXMLNodeGetSubelement(xmlNodePtr node,
  * Find and return a sub-elements node of @node named @name in a GPtrArray
  * populated with the xmlNodePtr objects. Caller is responsible for freeing the
  * array but not the contained xmlNode objects.
+ *
+ * Note: The returned GPtrArray is non-NULL even if @node doesn't contain such 
sub-elements
  */
 GPtrArray *
 virXMLNodeGetSubelementList(xmlNodePtr node,
-- 
2.48.1

Reply via email to