[libvirt] [PATCH 1/4] util: Umark virBufferCheckErrorInternal as ATTRIBUTE_RETURN_CHECK

Martin Kletzander mkletzan at redhat.com
Mon Aug 21 07:47:39 UTC 2017


The function is useful even without using the return value.  And if
needed, the return value can be obtained by other calls as well.  The
potential for clean-up can be seen in the following patch.

Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---
 src/util/virbuffer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virbuffer.h b/src/util/virbuffer.h
index f34217968b83..248c135b6077 100644
--- a/src/util/virbuffer.h
+++ b/src/util/virbuffer.h
@@ -58,7 +58,7 @@ int virBufferCheckErrorInternal(const virBuffer *buf,
                                 const char *filename,
                                 const char *funcname,
                                 size_t linenr)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
+    ATTRIBUTE_NONNULL(1);
 /**
  * virBufferCheckError
  *
-- 
2.14.1




More information about the libvir-list mailing list