Fold trailing whitespace
This commit is contained in:
parent
e53d7e3a11
commit
87752ac38b
@ -338,7 +338,7 @@ void uv_pipe_endgame(uv_loop_t* loop, uv_pipe_t* handle) {
|
|||||||
free(handle->pending_socket_info);
|
free(handle->pending_socket_info);
|
||||||
handle->pending_socket_info = NULL;
|
handle->pending_socket_info = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
|
if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
|
||||||
if (handle->read_req.wait_handle != INVALID_HANDLE_VALUE) {
|
if (handle->read_req.wait_handle != INVALID_HANDLE_VALUE) {
|
||||||
UnregisterWait(handle->read_req.wait_handle);
|
UnregisterWait(handle->read_req.wait_handle);
|
||||||
@ -866,7 +866,7 @@ static void uv_pipe_queue_read(uv_loop_t* loop, uv_pipe_t* handle) {
|
|||||||
/* Make this req pending reporting an error. */
|
/* Make this req pending reporting an error. */
|
||||||
SET_REQ_ERROR(req, GetLastError());
|
SET_REQ_ERROR(req, GetLastError());
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
memset(&req->overlapped, 0, sizeof(req->overlapped));
|
memset(&req->overlapped, 0, sizeof(req->overlapped));
|
||||||
if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
|
if (handle->flags & UV_HANDLE_EMULATE_IOCP) {
|
||||||
@ -1071,7 +1071,7 @@ static int uv_pipe_write_impl(uv_loop_t* loop, uv_write_t* req,
|
|||||||
ipc_frame.header.raw_data_length = bufs[0].len;
|
ipc_frame.header.raw_data_length = bufs[0].len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use the provided req if we're only doing a single write.
|
* Use the provided req if we're only doing a single write.
|
||||||
* If we're doing multiple writes, use ipc_header_write_req to do
|
* If we're doing multiple writes, use ipc_header_write_req to do
|
||||||
* the first write, and then use the provided req for the second write.
|
* the first write, and then use the provided req for the second write.
|
||||||
@ -1079,7 +1079,7 @@ static int uv_pipe_write_impl(uv_loop_t* loop, uv_write_t* req,
|
|||||||
if (!(ipc_frame.header.flags & UV_IPC_RAW_DATA)) {
|
if (!(ipc_frame.header.flags & UV_IPC_RAW_DATA)) {
|
||||||
ipc_header_req = req;
|
ipc_header_req = req;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Try to use the preallocated write req if it's available.
|
* Try to use the preallocated write req if it's available.
|
||||||
* Otherwise allocate a new one.
|
* Otherwise allocate a new one.
|
||||||
*/
|
*/
|
||||||
@ -1359,7 +1359,7 @@ void uv_process_pipe_read_req(uv_loop_t* loop, uv_pipe_t* handle,
|
|||||||
/* Successful read */
|
/* Successful read */
|
||||||
if (handle->ipc) {
|
if (handle->ipc) {
|
||||||
assert(handle->remaining_ipc_rawdata_bytes >= bytes);
|
assert(handle->remaining_ipc_rawdata_bytes >= bytes);
|
||||||
handle->remaining_ipc_rawdata_bytes =
|
handle->remaining_ipc_rawdata_bytes =
|
||||||
handle->remaining_ipc_rawdata_bytes - bytes;
|
handle->remaining_ipc_rawdata_bytes - bytes;
|
||||||
if (handle->read2_cb) {
|
if (handle->read2_cb) {
|
||||||
handle->read2_cb(handle, bytes, buf,
|
handle->read2_cb(handle, bytes, buf,
|
||||||
|
|||||||
@ -832,7 +832,7 @@ done:
|
|||||||
static int duplicate_std_handle(uv_loop_t* loop, DWORD id, HANDLE* dup) {
|
static int duplicate_std_handle(uv_loop_t* loop, DWORD id, HANDLE* dup) {
|
||||||
HANDLE handle;
|
HANDLE handle;
|
||||||
HANDLE current_process = GetCurrentProcess();
|
HANDLE current_process = GetCurrentProcess();
|
||||||
|
|
||||||
handle = GetStdHandle(id);
|
handle = GetStdHandle(id);
|
||||||
|
|
||||||
if (handle == NULL) {
|
if (handle == NULL) {
|
||||||
|
|||||||
@ -552,7 +552,7 @@ int uv_tcp_accept(uv_tcp_t* server, uv_tcp_t* client) {
|
|||||||
|
|
||||||
if (server->processed_accepts >= uv_simultaneous_server_accepts) {
|
if (server->processed_accepts >= uv_simultaneous_server_accepts) {
|
||||||
server->processed_accepts = 0;
|
server->processed_accepts = 0;
|
||||||
/*
|
/*
|
||||||
* All previously queued accept requests are now processed.
|
* All previously queued accept requests are now processed.
|
||||||
* We now switch to queueing just a single accept.
|
* We now switch to queueing just a single accept.
|
||||||
*/
|
*/
|
||||||
@ -835,7 +835,7 @@ void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle,
|
|||||||
err = GET_REQ_SOCK_ERROR(req);
|
err = GET_REQ_SOCK_ERROR(req);
|
||||||
|
|
||||||
if (err == WSAECONNABORTED) {
|
if (err == WSAECONNABORTED) {
|
||||||
/*
|
/*
|
||||||
* Turn WSAECONNABORTED into UV_ECONNRESET to be consistent with Unix.
|
* Turn WSAECONNABORTED into UV_ECONNRESET to be consistent with Unix.
|
||||||
*/
|
*/
|
||||||
uv__set_error(loop, UV_ECONNRESET, err);
|
uv__set_error(loop, UV_ECONNRESET, err);
|
||||||
@ -904,7 +904,7 @@ void uv_process_tcp_read_req(uv_loop_t* loop, uv_tcp_t* handle,
|
|||||||
handle->read_cb((uv_stream_t*)handle, 0, buf);
|
handle->read_cb((uv_stream_t*)handle, 0, buf);
|
||||||
} else {
|
} else {
|
||||||
if (err == WSAECONNABORTED) {
|
if (err == WSAECONNABORTED) {
|
||||||
/*
|
/*
|
||||||
* Turn WSAECONNABORTED into UV_ECONNRESET to be consistent with Unix.
|
* Turn WSAECONNABORTED into UV_ECONNRESET to be consistent with Unix.
|
||||||
*/
|
*/
|
||||||
uv__set_error(loop, UV_ECONNRESET, err);
|
uv__set_error(loop, UV_ECONNRESET, err);
|
||||||
@ -1090,7 +1090,7 @@ int uv_tcp_duplicate_socket(uv_tcp_t* handle, int pid,
|
|||||||
LPWSAPROTOCOL_INFOW protocol_info) {
|
LPWSAPROTOCOL_INFOW protocol_info) {
|
||||||
assert(!(handle->flags & UV_HANDLE_CONNECTION));
|
assert(!(handle->flags & UV_HANDLE_CONNECTION));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We're about to share the socket with another process. Because
|
* We're about to share the socket with another process. Because
|
||||||
* this is a listening socket, we assume that the other process will
|
* this is a listening socket, we assume that the other process will
|
||||||
* be accepting connections on it. So, before sharing the socket
|
* be accepting connections on it. So, before sharing the socket
|
||||||
|
|||||||
@ -84,7 +84,7 @@ static void ipc_on_connection(uv_stream_t* server, int status) {
|
|||||||
uv_tcp_t* conn;
|
uv_tcp_t* conn;
|
||||||
|
|
||||||
if (!connection_accepted) {
|
if (!connection_accepted) {
|
||||||
/*
|
/*
|
||||||
* Accept the connection and close it. Also let the other
|
* Accept the connection and close it. Also let the other
|
||||||
* side know.
|
* side know.
|
||||||
*/
|
*/
|
||||||
@ -119,7 +119,7 @@ static int ipc_helper(int listen_after_write) {
|
|||||||
* data is transfered over the channel. XXX edit this comment after handle
|
* data is transfered over the channel. XXX edit this comment after handle
|
||||||
* transfer is added.
|
* transfer is added.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uv_write_t write_req;
|
uv_write_t write_req;
|
||||||
int r;
|
int r;
|
||||||
uv_buf_t buf;
|
uv_buf_t buf;
|
||||||
@ -206,7 +206,7 @@ static int stdio_over_pipes_helper() {
|
|||||||
uv_buf_t buf[COUNTOF(buffers)];
|
uv_buf_t buf[COUNTOF(buffers)];
|
||||||
int r, i;
|
int r, i;
|
||||||
uv_loop_t* loop = uv_default_loop();
|
uv_loop_t* loop = uv_default_loop();
|
||||||
|
|
||||||
ASSERT(UV_NAMED_PIPE == uv_guess_handle(0));
|
ASSERT(UV_NAMED_PIPE == uv_guess_handle(0));
|
||||||
ASSERT(UV_NAMED_PIPE == uv_guess_handle(1));
|
ASSERT(UV_NAMED_PIPE == uv_guess_handle(1));
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,7 @@ void check_permission(const char* filename, int mode) {
|
|||||||
|
|
||||||
s = req.ptr;
|
s = req.ptr;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
/*
|
/*
|
||||||
* On Windows, chmod can only modify S_IWUSR (_S_IWRITE) bit,
|
* On Windows, chmod can only modify S_IWUSR (_S_IWRITE) bit,
|
||||||
* so only testing for the specified flags.
|
* so only testing for the specified flags.
|
||||||
*/
|
*/
|
||||||
@ -1210,7 +1210,7 @@ TEST_IMPL(fs_symlink) {
|
|||||||
*/
|
*/
|
||||||
return 0;
|
return 0;
|
||||||
} else if (uv_last_error(loop).sys_errno_ == ERROR_PRIVILEGE_NOT_HELD) {
|
} else if (uv_last_error(loop).sys_errno_ == ERROR_PRIVILEGE_NOT_HELD) {
|
||||||
/*
|
/*
|
||||||
* Creating a symlink is only allowed when running elevated.
|
* Creating a symlink is only allowed when running elevated.
|
||||||
* We pass the test and bail out early if we get ERROR_PRIVILEGE_NOT_HELD.
|
* We pass the test and bail out early if we get ERROR_PRIVILEGE_NOT_HELD.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user