aboutsummaryrefslogtreecommitdiff
path: root/src/bind.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-01-14 11:26:29 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-01-15 15:44:48 +0100
commit0e9add9a89fef3db585c3a5d1f94fe1712318d67 (patch)
treedad463b8768329957f82da28d45cc124f26469e7 /src/bind.c
parent2eb0dc6446d6b44a9bebebad6a203eba4c6a69da (diff)
downloadlibssh-0e9add9a89fef3db585c3a5d1f94fe1712318d67.tar.gz
libssh-0e9add9a89fef3db585c3a5d1f94fe1712318d67.tar.xz
libssh-0e9add9a89fef3db585c3a5d1f94fe1712318d67.zip
bind: Reformat ssh_bind_get_poll()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/bind.c')
-rw-r--r--src/bind.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/bind.c b/src/bind.c
index 63ef3a94..a91b3ad8 100644
--- a/src/bind.c
+++ b/src/bind.c
@@ -343,12 +343,17 @@ static int ssh_bind_poll_callback(ssh_poll_handle sshpoll,
* @param sshbind the ssh_bind object
* @returns a ssh_poll handle suitable for operation
*/
-ssh_poll_handle ssh_bind_get_poll(ssh_bind sshbind){
- if(sshbind->poll)
+ssh_poll_handle ssh_bind_get_poll(ssh_bind sshbind)
+{
+ if (sshbind->poll) {
+ return sshbind->poll;
+ }
+ sshbind->poll = ssh_poll_new(sshbind->bindfd,
+ POLLIN,
+ ssh_bind_poll_callback,
+ sshbind);
+
return sshbind->poll;
- sshbind->poll=ssh_poll_new(sshbind->bindfd,POLLIN,
- ssh_bind_poll_callback,sshbind);
- return sshbind->poll;
}
void ssh_bind_set_blocking(ssh_bind sshbind, int blocking) {