Reformat and initialize pointers

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2022-10-31 16:08:53 +01:00
parent 0c64a62fb7
commit 8f7c179bed
4 changed files with 22 additions and 13 deletions

View File

@@ -634,9 +634,10 @@ void ssh_set_fd_except(ssh_session session) {
*
* @return SSH_OK on success, SSH_ERROR otherwise.
*/
int ssh_handle_packets(ssh_session session, int timeout) {
ssh_poll_handle spoll;
ssh_poll_ctx ctx;
int ssh_handle_packets(ssh_session session, int timeout)
{
ssh_poll_handle spoll = NULL;
ssh_poll_ctx ctx = NULL;
int tm = timeout;
int rc;
@@ -654,11 +655,12 @@ int ssh_handle_packets(ssh_session session, int timeout) {
}
if (timeout == SSH_TIMEOUT_USER) {
if (ssh_is_blocking(session))
tm = ssh_make_milliseconds(session->opts.timeout,
session->opts.timeout_usec);
else
tm = 0;
if (ssh_is_blocking(session)) {
tm = ssh_make_milliseconds(session->opts.timeout,
session->opts.timeout_usec);
} else {
tm = 0;
}
}
rc = ssh_poll_ctx_dopoll(ctx, tm);
if (rc == SSH_ERROR) {