diff options
author | Jakub Jelen <jjelen@redhat.com> | 2021-03-04 10:29:40 +0100 |
---|---|---|
committer | Jakub Jelen <jjelen@redhat.com> | 2021-08-17 15:46:54 +0200 |
commit | c2c56040777f859b8269fed60a3b8637ad0a8859 (patch) | |
tree | e1b4fa1a618552eb579a410a8e63266898a5235c | |
parent | 51a0adfc18c5d30887f12cce6ded80dd145532a6 (diff) | |
download | libssh-c2c56040777f859b8269fed60a3b8637ad0a8859.tar.gz libssh-c2c56040777f859b8269fed60a3b8637ad0a8859.tar.xz libssh-c2c56040777f859b8269fed60a3b8637ad0a8859.zip |
Reformat sftp_new_channel
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
(cherry picked from commit 78036e98ecf8b45c4889be7f7b035e673d7cca02)
-rw-r--r-- | src/sftp.c | 42 |
1 files changed, 21 insertions, 21 deletions
@@ -173,32 +173,32 @@ error: return NULL; } -sftp_session sftp_new_channel(ssh_session session, ssh_channel channel){ - sftp_session sftp; - - if (session == NULL) { - return NULL; - } - - sftp = calloc(1, sizeof(struct sftp_session_struct)); - if (sftp == NULL) { - ssh_set_error_oom(session); +sftp_session +sftp_new_channel(ssh_session session, ssh_channel channel) +{ + sftp_session sftp = NULL; - return NULL; - } + if (session == NULL) { + return NULL; + } - sftp->ext = sftp_ext_new(); - if (sftp->ext == NULL) { - ssh_set_error_oom(session); - SAFE_FREE(sftp); + sftp = calloc(1, sizeof(struct sftp_session_struct)); + if (sftp == NULL) { + ssh_set_error_oom(session); + return NULL; + } - return NULL; - } + sftp->ext = sftp_ext_new(); + if (sftp->ext == NULL) { + ssh_set_error_oom(session); + SAFE_FREE(sftp); + return NULL; + } - sftp->session = session; - sftp->channel = channel; + sftp->session = session; + sftp->channel = channel; - return sftp; + return sftp; } #ifdef WITH_SERVER |