1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-13 04:42:23 +03:00

Reformat sftp_new_channel

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
This commit is contained in:
Jakub Jelen
2021-03-04 10:29:40 +01:00
parent c10d06b322
commit 78036e98ec

View File

@@ -173,8 +173,10 @@ error:
return NULL; return NULL;
} }
sftp_session sftp_new_channel(ssh_session session, ssh_channel channel){ sftp_session
sftp_session sftp; sftp_new_channel(ssh_session session, ssh_channel channel)
{
sftp_session sftp = NULL;
if (session == NULL) { if (session == NULL) {
return NULL; return NULL;
@@ -183,7 +185,6 @@ sftp_session sftp_new_channel(ssh_session session, ssh_channel channel){
sftp = calloc(1, sizeof(struct sftp_session_struct)); sftp = calloc(1, sizeof(struct sftp_session_struct));
if (sftp == NULL) { if (sftp == NULL) {
ssh_set_error_oom(session); ssh_set_error_oom(session);
return NULL; return NULL;
} }
@@ -191,7 +192,6 @@ sftp_session sftp_new_channel(ssh_session session, ssh_channel channel){
if (sftp->ext == NULL) { if (sftp->ext == NULL) {
ssh_set_error_oom(session); ssh_set_error_oom(session);
SAFE_FREE(sftp); SAFE_FREE(sftp);
return NULL; return NULL;
} }