From 5a690f695fe82d202aa979da21ce143c64104f59 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 22 Feb 2019 17:36:23 +0100 Subject: [PATCH] util: xml: Enforce return value check from virXMLFormatElement MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The function does not transfer errors from 'attrBuf' and 'childBuf' arguments into 'buf', but rather reports them right away, thus we need to make sure that it's always checked. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/util/virxml.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/virxml.h b/src/util/virxml.h index 78a1e7fa5e..b91fedde82 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -217,7 +217,8 @@ int virXMLFormatElement(virBufferPtr buf, const char *name, virBufferPtr attrBuf, - virBufferPtr childBuf); + virBufferPtr childBuf) + ATTRIBUTE_RETURN_CHECK; struct _virXPathContextNodeSave { xmlXPathContextPtr ctxt; -- 2.39.5