diff options
author | Brad King <brad.king@kitware.com> | 2018-05-07 15:48:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-07 15:48:01 (GMT) |
commit | 42fbb285161a7424116a1e838b29741864ab3691 (patch) | |
tree | 858d1d7aa84098ce326d32c41da9047d9cd95064 /Utilities/cmlibuv/src/unix/getaddrinfo.c | |
parent | dd3e1a737216b7c9bfb6c7569685b36a1bff9cba (diff) | |
parent | c8b67ea119c4000018238f6c3201a1364356d93a (diff) | |
download | CMake-42fbb285161a7424116a1e838b29741864ab3691.zip CMake-42fbb285161a7424116a1e838b29741864ab3691.tar.gz CMake-42fbb285161a7424116a1e838b29741864ab3691.tar.bz2 |
Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv:
libuv 2018-05-06 (bf605bd7)
Diffstat (limited to 'Utilities/cmlibuv/src/unix/getaddrinfo.c')
-rw-r--r-- | Utilities/cmlibuv/src/unix/getaddrinfo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Utilities/cmlibuv/src/unix/getaddrinfo.c b/Utilities/cmlibuv/src/unix/getaddrinfo.c index 0185971..10e8afd 100644 --- a/Utilities/cmlibuv/src/unix/getaddrinfo.c +++ b/Utilities/cmlibuv/src/unix/getaddrinfo.c @@ -86,7 +86,7 @@ int uv__getaddrinfo_translate_error(int sys_err) { case EAI_SOCKTYPE: return UV_EAI_SOCKTYPE; #endif #if defined(EAI_SYSTEM) - case EAI_SYSTEM: return -errno; + case EAI_SYSTEM: return UV__ERR(errno); #endif } assert(!"unknown EAI_* error code"); @@ -125,7 +125,7 @@ static void uv__getaddrinfo_done(struct uv__work* w, int status) { req->service = NULL; req->hostname = NULL; - if (status == -ECANCELED) { + if (status == UV_ECANCELED) { assert(req->retcode == 0); req->retcode = UV_EAI_CANCELED; } @@ -148,7 +148,7 @@ int uv_getaddrinfo(uv_loop_t* loop, char* buf; if (req == NULL || (hostname == NULL && service == NULL)) - return -EINVAL; + return UV_EINVAL; hostname_len = hostname ? strlen(hostname) + 1 : 0; service_len = service ? strlen(service) + 1 : 0; @@ -156,7 +156,7 @@ int uv_getaddrinfo(uv_loop_t* loop, buf = uv__malloc(hostname_len + service_len + hints_len); if (buf == NULL) - return -ENOMEM; + return UV_ENOMEM; uv__req_init(loop, req, UV_GETADDRINFO); req->loop = loop; @@ -211,7 +211,7 @@ int uv_if_indextoname(unsigned int ifindex, char* buffer, size_t* size) { return UV_EINVAL; if (if_indextoname(ifindex, ifname_buf) == NULL) - return -errno; + return UV__ERR(errno); len = strnlen(ifname_buf, sizeof(ifname_buf)); |