This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch 
feature/array_list_return_status_on_modification
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 0fc6f3ce2019088e5ebd95d81d1599b27bfe8162
Author: Pepijn Noltes <[email protected]>
AuthorDate: Mon May 1 19:18:34 2023 +0200

    Add CELIX_GOTO_IF_ERR marcro to celix_errno.h
---
 libs/utils/include/celix_errno.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libs/utils/include/celix_errno.h b/libs/utils/include/celix_errno.h
index 8a3dbf02..9e5e92b2 100644
--- a/libs/utils/include/celix_errno.h
+++ b/libs/utils/include/celix_errno.h
@@ -52,6 +52,12 @@ extern "C" {
  */
 #define CELIX_DO_IF(status, expr) ((status) == CELIX_SUCCESS) ? (expr) : 
(status)
 
+/*!
+ * Helper macro which check the current status and executes a goto the 
provided label if the
+ * status is not CELIX_SUCCESS (0)
+ */
+#define CELIX_GOTO_IF_ERR(status, label) if ((status) != CELIX_SUCCESS) { goto 
label; }
+
 /*!
  * \defgroup celix_errno Error Codes
  * \ingroup framework

Reply via email to