]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virXMLNodeGetSubelementList: Document return value semantics
authorPeter Krempa <pkrempa@redhat.com>
Tue, 25 Feb 2025 11:34:39 +0000 (12:34 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 12 Mar 2025 11:56:58 +0000 (12:56 +0100)
The returned value is always non-NULL. Callers need to check the length
of the returned array instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virxml.c

index 06e698cdf8215c87c83ce87a511a18c880a4c89c..ad967a2564ecf37980a5c59559d2ee3dd740fe08 100644 (file)
@@ -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,