diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/zix/common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/zix/common.h b/include/zix/common.h index a097edd..59a61ac 100644 --- a/include/zix/common.h +++ b/include/zix/common.h @@ -42,6 +42,11 @@ ZIX_CONST_API ZixStatus zix_errno_status(int e); +/// Return success if `r` is non-zero, or `errno` as a status code otherwise +ZIX_PURE_API +ZixStatus +zix_errno_status_if(int r); + /// Function for comparing two elements typedef int (*ZixComparator)(const void* a, const void* b, |