From ca984c351eca4dcb021dac0e6683d10ebf705e58 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 20 Nov 2021 15:23:45 +0100 Subject: libssh has an int as port, not a short --- src/cssh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cssh.c b/src/cssh.c index 0d40440..d3a97ec 100644 --- a/src/cssh.c +++ b/src/cssh.c @@ -351,7 +351,7 @@ static int authenticate_pubkey( ssh_session session ) return -1; } -static int authenticate_password( ssh_session session, const char *host, const unsigned short port, const char *user ) +static int authenticate_password( ssh_session session, const char *host, const unsigned int port, const char *user ) { char prompt[128]; char pass[128]; @@ -550,7 +550,7 @@ static const char *buffer_contains_a_line( const char *buffer, size_t bufsize ) return NULL; } -static ssize_t output_buffer( FILE *f, const char *host, const unsigned short port, const char *buffer, const size_t bufsize, const bool tagging ) +static ssize_t output_buffer( FILE *f, const char *host, const unsigned int port, const char *buffer, const size_t bufsize, const bool tagging ) { const char *b = buffer; size_t bsize = bufsize; @@ -646,7 +646,7 @@ int main( int argc, char *argv[] ) // command line arguments are '[user@]host' if( !args_info.hosts_file_given ) { - unsigned short default_port = get_default_ssh_port( ); + unsigned int default_port = get_default_ssh_port( ); if( args_info.port_given ) { default_port = args_info.port_arg; } @@ -702,7 +702,7 @@ int main( int argc, char *argv[] ) // just : for the home directory on all hosts in -H hosts. // seems quite logical (at least to me :-)) - unsigned short default_port = get_default_ssh_port( ); + unsigned int default_port = get_default_ssh_port( ); host = (char **)malloc( sizeof( char * ) ); port = (unsigned int *)malloc( sizeof( unsigned int ) ); if( args_info.port_given ) { -- cgit v1.2.3-54-g00ecf