diff options
author | Jakub Jelen <jjelen@redhat.com> | 2018-11-16 15:31:20 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-11-23 17:30:16 +0100 |
commit | 0b4c2a8e62d8911bd732918088ad6a4e5c12c1c6 (patch) | |
tree | 922d1c4e94cbafaabe353d08eefc8970ecb2076a /src/session.c | |
parent | 8418a1131e32cfe3a061ea6382d0e883304527e2 (diff) | |
download | libssh-0b4c2a8e62d8911bd732918088ad6a4e5c12c1c6.tar.gz libssh-0b4c2a8e62d8911bd732918088ad6a4e5c12c1c6.tar.xz libssh-0b4c2a8e62d8911bd732918088ad6a4e5c12c1c6.zip |
session: Reformat ssh_{set,is}_blocking
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/session.c')
-rw-r--r-- | src/session.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/session.c b/src/session.c index 013a89ae..48103cba 100644 --- a/src/session.c +++ b/src/session.c @@ -450,12 +450,13 @@ void ssh_silent_disconnect(ssh_session session) { * * @param[in] blocking Zero for nonblocking mode. */ -void ssh_set_blocking(ssh_session session, int blocking) { - if (session == NULL) { - return; - } - session->flags &= ~SSH_SESSION_FLAG_BLOCKING; - session->flags |= blocking ? SSH_SESSION_FLAG_BLOCKING : 0; +void ssh_set_blocking(ssh_session session, int blocking) +{ + if (session == NULL) { + return; + } + session->flags &= ~SSH_SESSION_FLAG_BLOCKING; + session->flags |= blocking ? SSH_SESSION_FLAG_BLOCKING : 0; } /** @@ -464,8 +465,9 @@ void ssh_set_blocking(ssh_session session, int blocking) { * @returns 0 if the session is nonblocking, * @returns 1 if the functions may block. */ -int ssh_is_blocking(ssh_session session){ - return (session->flags&SSH_SESSION_FLAG_BLOCKING) ? 1 : 0; +int ssh_is_blocking(ssh_session session) +{ + return (session->flags & SSH_SESSION_FLAG_BLOCKING) ? 1 : 0; } /* Waits until the output socket is empty */ |