aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-08-30 08:51:33 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-08-30 08:51:33 +0200
commit8243030c55e4ab277981d3ea69f7863d5acd5da4 (patch)
tree0f41f7b0929350ae540d7b93d36a1d6d5b8d8f6d /src
parent111d06eac5587e5e9bdd300128010802918e8f9e (diff)
downloadlibssh-8243030c55e4ab277981d3ea69f7863d5acd5da4.tar.gz
libssh-8243030c55e4ab277981d3ea69f7863d5acd5da4.tar.xz
libssh-8243030c55e4ab277981d3ea69f7863d5acd5da4.zip
poll: Reformat ssh_event_free()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/poll.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/poll.c b/src/poll.c
index df72c6fa..a12b4d36 100644
--- a/src/poll.c
+++ b/src/poll.c
@@ -1013,17 +1013,20 @@ int ssh_event_remove_connector(ssh_event event, ssh_connector connector){
* fds before freeing the event object.
*
*/
-void ssh_event_free(ssh_event event) {
- int used, i;
- ssh_poll_handle p;
- if(event == NULL) {
+void ssh_event_free(ssh_event event)
+{
+ int used, i;
+ ssh_poll_handle p;
+
+ if(event == NULL) {
return;
}
- if(event->ctx != NULL) {
+
+ if (event->ctx != NULL) {
used = event->ctx->polls_used;
for(i = 0; i < used; i++) {
- p = event->ctx->pollptrs[i];
- if(p->session != NULL){
+ p = event->ctx->pollptrs[i];
+ if (p->session != NULL) {
ssh_poll_ctx_remove(event->ctx, p);
ssh_poll_ctx_add(p->session->default_poll_ctx, p);
p->session = NULL;