unix: remove unused uv__translate_lib_error() function
This commit is contained in:
parent
61ef8cc962
commit
04dfd46349
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user