aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2020-07-26 04:03:12 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2020-07-26 04:03:12 +0200
commitc597344eb7b9b34fe4725165475fdeb1510b5172 (patch)
tree0bf1a56fa50105950074e5642c91244926af8781 /include
parent9c8d949cd1df0e52fc70e8dcfae24030dff6ec6c (diff)
Added convenience macro dynstr_append_or_ret_nonzero
Diffstat (limited to 'include')
-rw-r--r--include/dynstr.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/dynstr.h b/include/dynstr.h
index ee3b22b..dcdd8a1 100644
--- a/include/dynstr.h
+++ b/include/dynstr.h
@@ -45,7 +45,12 @@
/**
* Convenience macro that calls dynstr_append and returns zero if failed.
*/
-#define dynstr_append_or_ret_zero( ...) if (dynstr_append( __VA_ARGS__) != DYNSTR_OK) return 0
+#define dynstr_append_or_ret_zero(...) if (dynstr_append(__VA_ARGS__) != DYNSTR_OK) return 0
+
+/**
+ * Convenience macro that calls dynstr_append and returns zero if failed.
+ */
+#define dynstr_append_or_ret_nonzero(...) if (dynstr_append(__VA_ARGS__) != DYNSTR_OK) return 1
/**
* Dynamic string type used for this library.