Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

unix: remove unused uv__translate_lib_error() function

  • Loading branch information...
commit 04dfd46349d3942c73537b4c33c1130864181d2c 1 parent 61ef8cc
@bnoordhuis bnoordhuis authored
Showing with 0 additions and 32 deletions.
  1. +0 −32 src/unix/error.c
View
32 src/unix/error.c
@@ -56,38 +56,6 @@ void uv_fatal_error(const int errorno, const char* syscall) {
}
-static int uv__translate_lib_error(int code) {
- switch (code) {
- case UV_ENOSYS: return ENOSYS;
- case UV_ENOTSOCK: return ENOTSOCK;
- case UV_ENOENT: return ENOENT;
- case UV_EACCES: return EACCES;
- case UV_EAFNOSUPPORT: return EAFNOSUPPORT;
- case UV_EBADF: return EBADF;
- case UV_EPIPE: return EPIPE;
- case UV_EAGAIN: return EAGAIN;
- case UV_ECONNRESET: return ECONNRESET;
- case UV_EFAULT: return EFAULT;
- case UV_EMFILE: return EMFILE;
- case UV_EMSGSIZE: return EMSGSIZE;
- case UV_EINVAL: return EINVAL;
- case UV_ECONNREFUSED: return ECONNREFUSED;
- case UV_EADDRINUSE: return EADDRINUSE;
- case UV_EADDRNOTAVAIL: return EADDRNOTAVAIL;
- case UV_ENOTDIR: return ENOTDIR;
- case UV_EISDIR: return EISDIR;
- case UV_ENOTCONN: return ENOTCONN;
- case UV_EEXIST: return EEXIST;
- case UV_EHOSTUNREACH: return EHOSTUNREACH;
- case UV_ESRCH: return ESRCH;
- default: return -1;
- }
-
- assert(0 && "unreachable");
- return -1;
-}
-
-
uv_err_code uv_translate_sys_error(int sys_errno) {
switch (sys_errno) {
case 0: return UV_OK;
Please sign in to comment.
Something went wrong with that request. Please try again.