[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 02/15] error: New IGNORE_ERRORS macro
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [RFC 02/15] error: New IGNORE_ERRORS macro |
Date: |
Tue, 13 Jun 2017 13:53:00 -0300 |
Define new IGNORE_ERRORS macro that should be used when errors will be
ignored.
NULL will still work by now, but will break once we implement
IGNORE_ERRORS in a different way later. Other patches will convert
existing code to use IGNORE_ERRORS.
Signed-off-by: Eduardo Habkost <address@hidden>
---
include/qapi/error.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/qapi/error.h b/include/qapi/error.h
index 7e532d00e9..38f7afba2e 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -66,7 +66,7 @@
* }
*
* Call a function ignoring errors:
- * foo(arg, NULL);
+ * foo(arg, IGNORE_ERRORS);
*
* Call a function aborting on errors:
* foo(arg, &error_abort);
@@ -117,6 +117,8 @@
#include "qapi-types.h"
+#define IGNORE_ERRORS (NULL)
+
/*
* Overall category of an error.
* Based on the qapi type QapiErrorClass, but reproduced here for nicer
--
2.11.0.259.g40922b1
- [Qemu-devel] [RFC 00/15] Error API: Flag errors in *errp even if errors are being ignored, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 02/15] error: New IGNORE_ERRORS macro,
Eduardo Habkost <=
- [Qemu-devel] [RFC 01/15] tests: Test cases for error API, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 03/15] Add qapi/error.h includes on files that will need it, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 05/15] qapi: Use IGNORE_ERRORS instead of NULL on generated code, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 06/15] test-qapi-util: Use IGNORE_ERRORS instead of NULL, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 08/15] error: New ERR_IS_* macros for checking Error** values, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 07/15] Manual changes to use IGNORE_ERRORS instead of NULL, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 10/15] test-qapi-util: Use ERR_IS_* macros, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 11/15] Manual changes to use ERR_IS_* macros, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 09/15] [coccinelle] Use ERR_IS_* macros, Eduardo Habkost, 2017/06/13
- [Qemu-devel] [RFC 12/15] error: Make IGNORED_ERRORS not a NULL pointer, Eduardo Habkost, 2017/06/13