diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-07-26 04:03:12 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2020-07-26 04:03:12 +0200 |
| commit | c597344eb7b9b34fe4725165475fdeb1510b5172 (patch) | |
| tree | 0bf1a56fa50105950074e5642c91244926af8781 /include | |
| parent | 9c8d949cd1df0e52fc70e8dcfae24030dff6ec6c (diff) | |
Added convenience macro dynstr_append_or_ret_nonzero
Diffstat (limited to 'include')
| -rw-r--r-- | include/dynstr.h | 7 |
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. |
