summaryrefslogtreecommitdiffstats
path: root/src/status.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-10-20 21:34:20 -0400
committerDavid Robillard <d@drobilla.net>2022-10-21 12:45:39 -0400
commitd072adfbe40e15715e2065f1900f8d5a76491c5f (patch)
tree350f7c5c70e84d7a1d98a8e9389af4a4d3631cb1 /src/status.c
parent60e86c7b2a05dab33fc66f4fa5b2954d79456cb6 (diff)
downloadzix-d072adfbe40e15715e2065f1900f8d5a76491c5f.tar.gz
zix-d072adfbe40e15715e2065f1900f8d5a76491c5f.tar.bz2
zix-d072adfbe40e15715e2065f1900f8d5a76491c5f.zip
Hide errno utility functions
Diffstat (limited to 'src/status.c')
-rw-r--r--src/status.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/status.c b/src/status.c
index e6fbec8..9cdab32 100644
--- a/src/status.c
+++ b/src/status.c
@@ -3,8 +3,6 @@
#include "zix/common.h"
-#include <errno.h>
-
const char*
zix_strerror(const ZixStatus status)
{
@@ -36,42 +34,3 @@ zix_strerror(const ZixStatus status)
}
return "Unknown error";
}
-
-ZixStatus
-zix_errno_status_if(const int r)
-{
- return r ? zix_errno_status(errno) : ZIX_STATUS_SUCCESS;
-}
-
-ZixStatus
-zix_errno_status(const int e)
-{
- switch (e) {
- case 0:
- return ZIX_STATUS_SUCCESS;
-#ifdef EAGAIN
- case EAGAIN:
- return ZIX_STATUS_UNAVAILABLE;
-#endif
-#ifdef EEXIST
- case EEXIST:
- return ZIX_STATUS_EXISTS;
-#endif
-#ifdef EINVAL
- case EINVAL:
- return ZIX_STATUS_BAD_ARG;
-#endif
-#ifdef EPERM
- case EPERM:
- return ZIX_STATUS_BAD_PERMS;
-#endif
-#ifdef ETIMEDOUT
- case ETIMEDOUT:
- return ZIX_STATUS_TIMEOUT;
-#endif
- default:
- break;
- }
-
- return ZIX_STATUS_ERROR;
-}