diff options
author | Saúl Ibarra Corretgé <saghul@gmail.com> | 2014-12-09 21:01:35 +0100 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-12-09 17:03:50 -0800 |
commit | 20a7088d9c62c43fedf9ab077fbbeae92c7e6617 (patch) | |
tree | cd62507bde03fff1e59de67338f2b406d2221bdd /deps/uv/src/unix/pipe.c | |
parent | 4dc660e164417e0a1bc86eadd825b41d7abb053f (diff) | |
download | android-node-v8-20a7088d9c62c43fedf9ab077fbbeae92c7e6617.tar.gz android-node-v8-20a7088d9c62c43fedf9ab077fbbeae92c7e6617.tar.bz2 android-node-v8-20a7088d9c62c43fedf9ab077fbbeae92c7e6617.zip |
deps: update libuv to 1.0.2
PR-URL: https://github.com/joyent/node/pull/8847
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'deps/uv/src/unix/pipe.c')
-rw-r--r-- | deps/uv/src/unix/pipe.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/deps/uv/src/unix/pipe.c b/deps/uv/src/unix/pipe.c index a26c3dbc13..b20fb9210c 100644 --- a/deps/uv/src/unix/pipe.c +++ b/deps/uv/src/unix/pipe.c @@ -44,13 +44,10 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { struct sockaddr_un saddr; const char* pipe_fname; int sockfd; - int bound; int err; pipe_fname = NULL; sockfd = -1; - bound = 0; - err = -EINVAL; /* Already bound? */ if (uv__stream_fd(handle) >= 0) @@ -83,7 +80,6 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { err = -EACCES; goto out; } - bound = 1; /* Success. */ handle->pipe_fname = pipe_fname; /* Is a strdup'ed copy. */ @@ -91,11 +87,9 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { return 0; out: - if (bound) { - /* unlink() before uv__close() to avoid races. */ - assert(pipe_fname != NULL); - unlink(pipe_fname); - } + /* unlink() before uv__close() to avoid races. */ + assert(pipe_fname != NULL); + unlink(pipe_fname); uv__close(sockfd); free((void*)pipe_fname); return err; @@ -158,7 +152,6 @@ void uv_pipe_connect(uv_connect_t* req, int r; new_sock = (uv__stream_fd(handle) == -1); - err = -EINVAL; if (new_sock) { err = uv__socket(AF_UNIX, SOCK_STREAM, 0); |