unix: inline uv_pipe_bind() err_bind goto target
This goto target is only one line, and is only reached from one place. PR-URL: https://github.com/libuv/libuv/pull/1289 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
cd37fd0fd2
commit
36d6b1f445
@ -76,7 +76,9 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
|
||||
/* Convert ENOENT to EACCES for compatibility with Windows. */
|
||||
if (err == -ENOENT)
|
||||
err = -EACCES;
|
||||
goto err_bind;
|
||||
|
||||
uv__close(sockfd);
|
||||
goto err_socket;
|
||||
}
|
||||
|
||||
/* Success. */
|
||||
@ -85,9 +87,6 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
|
||||
handle->io_watcher.fd = sockfd;
|
||||
return 0;
|
||||
|
||||
err_bind:
|
||||
uv__close(sockfd);
|
||||
|
||||
err_socket:
|
||||
uv__free((void*)pipe_fname);
|
||||
return err;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user