From: Peter Krempa Date: Fri, 22 Feb 2019 16:36:23 +0000 (+0100) Subject: util: xml: Enforce return value check from virXMLFormatElement X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5a690f695fe82d202aa979da21ce143c64104f59;p=libvirt.git util: xml: Enforce return value check from virXMLFormatElement 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 --- 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;