[PATCH 13/37] util: xml: Adjust documentation of virXMLPropString

Peter Krempa posted 37 patches 3 years, 4 months ago
[PATCH 13/37] util: xml: Adjust documentation of virXMLPropString
Posted by Peter Krempa 3 years, 4 months ago
All callers treat NULL as if the string is not present in the XML.
Adjust the description so that it's implied that it's not an error and
thus also no error reporting is expected.

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

diff --git a/src/util/virxml.c b/src/util/virxml.c
index 04a8b29ba3..eac2d0a73f 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -443,7 +443,8 @@ virXMLCheckIllegalChars(const char *nodeName,
  *
  * Convenience function to return copy of an attribute value of a XML node.
  *
- * Returns the property (attribute) value as string or NULL in case of failure.
+ * Returns the property (attribute) value as string or NULL if the attribute
+ * is not present (no error is reported).
  * The caller is responsible for freeing the returned buffer.
  */
 char *
-- 
2.37.1
Re: [PATCH 13/37] util: xml: Adjust documentation of virXMLPropString
Posted by Ján Tomko 3 years, 4 months ago
On a Monday in 2022, Peter Krempa wrote:
>All callers treat NULL as if the string is not present in the XML.
>Adjust the description so that it's implied that it's not an error and
>thus also no error reporting is expected.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/util/virxml.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano