summaryrefslogtreecommitdiffstats
path: root/src/status.c
diff options
context:
space:
mode:
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;
-}