mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
tidy-up: whitespace nits [ci skip]
This commit is contained in:
@@ -2086,7 +2086,7 @@ ssize_t _libssh2_channel_read(LIBSSH2_CHANNEL *channel, int stream_id,
|
||||
/* expand the receiving window first if it has become too narrow */
|
||||
if((channel->read_state == libssh2_NB_state_jump1) ||
|
||||
(channel->remote.window_size <
|
||||
channel->remote.window_size_initial / 4 * 3 + buflen) ) {
|
||||
channel->remote.window_size_initial / 4 * 3 + buflen)) {
|
||||
|
||||
uint32_t adjustment = (uint32_t)(channel->remote.window_size_initial +
|
||||
buflen - channel->remote.window_size);
|
||||
@@ -2737,7 +2737,7 @@ libssh2_channel_close(LIBSSH2_CHANNEL *channel)
|
||||
if(!channel)
|
||||
return LIBSSH2_ERROR_BAD_USE;
|
||||
|
||||
BLOCK_ADJUST(rc, channel->session, _libssh2_channel_close(channel) );
|
||||
BLOCK_ADJUST(rc, channel->session, _libssh2_channel_close(channel));
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ _libssh2_openssh_pem_parse_data(LIBSSH2_SESSION * session,
|
||||
|
||||
if(strcmp((const char *)kdfname, "bcrypt") == 0 && passphrase) {
|
||||
if((_libssh2_get_string(&kdf_buf, &salt, &salt_len)) ||
|
||||
(_libssh2_get_u32(&kdf_buf, &rounds) != 0) ) {
|
||||
(_libssh2_get_u32(&kdf_buf, &rounds) != 0)) {
|
||||
ret = _libssh2_error(session, LIBSSH2_ERROR_PROTO,
|
||||
"kdf contains unexpected values");
|
||||
LIBSSH2_FREE(session, key);
|
||||
|
||||
@@ -812,7 +812,7 @@ libssh2_session_handshake(LIBSSH2_SESSION *session, libssh2_socket_t sock)
|
||||
{
|
||||
int rc;
|
||||
|
||||
BLOCK_ADJUST(rc, session, session_startup(session, sock) );
|
||||
BLOCK_ADJUST(rc, session, session_startup(session, sock));
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -1107,7 +1107,7 @@ libssh2_session_free(LIBSSH2_SESSION * session)
|
||||
{
|
||||
int rc;
|
||||
|
||||
BLOCK_ADJUST(rc, session, session_free(session) );
|
||||
BLOCK_ADJUST(rc, session, session_free(session));
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
|
||||
/* Conveniance-macros to allow code like this;
|
||||
|
||||
int rc = BLOCK_ADJUST(rc, session, session_startup(session, sock) );
|
||||
int rc = BLOCK_ADJUST(rc, session, session_startup(session, sock));
|
||||
|
||||
int rc = BLOCK_ADJUST_ERRNO(ptr, session, session_startup(session, sock) );
|
||||
int rc = BLOCK_ADJUST_ERRNO(ptr, session, session_startup(session, sock));
|
||||
|
||||
The point of course being to make sure that while in non-blocking mode
|
||||
these always return no matter what the return code is, but in blocking mode
|
||||
@@ -78,7 +78,7 @@
|
||||
ptr = x; \
|
||||
if(!sess->api_block_mode || \
|
||||
(ptr != NULL) || \
|
||||
(libssh2_session_last_errno(sess) != LIBSSH2_ERROR_EAGAIN) ) \
|
||||
(libssh2_session_last_errno(sess) != LIBSSH2_ERROR_EAGAIN)) \
|
||||
break; \
|
||||
rc = _libssh2_wait_socket(sess, entry_time); \
|
||||
} while(!rc); \
|
||||
|
||||
@@ -2158,7 +2158,7 @@ userauth_keyboard_interactive(LIBSSH2_SESSION * session,
|
||||
for(i = 0; i < session->userauth_kybd_num_prompts; i++) {
|
||||
/* string response[1] (ISO-10646 UTF-8) */
|
||||
if(session->userauth_kybd_responses[i].length <=
|
||||
(SIZE_MAX - 4 - session->userauth_kybd_packet_len) ) {
|
||||
(SIZE_MAX - 4 - session->userauth_kybd_packet_len)) {
|
||||
session->userauth_kybd_packet_len +=
|
||||
4 + session->userauth_kybd_responses[i].length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user