summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-08-21 20:23:45 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2017-08-21 20:23:45 +0200
commit43aa69bfae228552f268da90d5326da2760eaafe (patch)
treecd6074bc4d1ebf7b5fa3aae86b16c22c8bcee943
parente22ef4ba7048df651153c7b9a934ea87daf69cfc (diff)
downloadcssh-43aa69bfae228552f268da90d5326da2760eaafe.tar.gz
cssh-43aa69bfae228552f268da90d5326da2760eaafe.tar.bz2
fixed some missing newlines in error messages
-rw-r--r--src/cssh.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/cssh.c b/src/cssh.c
index 2cdebee..ae81df8 100644
--- a/src/cssh.c
+++ b/src/cssh.c
@@ -286,7 +286,7 @@ static int verify_knownhost( ssh_session session )
case SSH_SERVER_ERROR:
ssh_clean_pubkey_hash( &hash );
- fprintf( stderr, "ERROR: 'ssh_is_server_known' failed with: %s",
+ fprintf( stderr, "ERROR: 'ssh_is_server_known' failed with: %s\n",
ssh_get_error( session ) );
return -1;
@@ -398,7 +398,7 @@ static int read_hosts_file( const char *hosts_file, unsigned short default_port,
*host = (char **)malloc( size_hosts * sizeof( char * ) );
*port = (unsigned short *)malloc( size_hosts * sizeof( unsigned short ) );
if( *host == NULL || *port == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed in 'read_hosts_file'" );
+ fprintf( stderr, "ERROR: Memory allocation failed in 'read_hosts_file'\n" );
return -1;
}
@@ -428,7 +428,7 @@ static int read_hosts_file( const char *hosts_file, unsigned short default_port,
*host = (char **)realloc( *host, size_hosts * sizeof( char *) );
*port = (unsigned short *)realloc( *port, size_hosts * sizeof( unsigned short ) );
if( *host == NULL || *port == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed in 'read_hosts_file'" );
+ fprintf( stderr, "ERROR: Memory allocation failed in 'read_hosts_file'\n" );
return -1;
}
}
@@ -763,7 +763,7 @@ int main( int argc, char *argv[] )
session = (ssh_session *)malloc( nof_sessions * sizeof( ssh_session ) );
if( session == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed for ssh_sessions" );
+ fprintf( stderr, "ERROR: Memory allocation failed for ssh_sessions\n" );
exit( EXIT_SUCCESS );
}
for( unsigned int i = 0; i < nof_sessions; i++ ) {
@@ -799,7 +799,7 @@ int main( int argc, char *argv[] )
bool all_connected = false;
bool *is_connected = (bool *)malloc( ( nof_sessions + 1 ) * sizeof( bool ) );
if( is_connected == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed for 'is_connected'" );
+ fprintf( stderr, "ERROR: Memory allocation failed for 'is_connected'\n" );
cleanup_sessions( &session, NULL, NULL, host, port, nof_sessions, args_info.verbose_given > 0 );
exit( EXIT_SUCCESS );
}
@@ -842,7 +842,7 @@ int main( int argc, char *argv[] )
bool all_authenticated = false;
auth_state_e *auth_state = (auth_state_e *)malloc( ( nof_sessions + 1 ) * sizeof( auth_state_e ) );
if( auth_state == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed for 'auth_state'" );
+ fprintf( stderr, "ERROR: Memory allocation failed for 'auth_state'\n" );
cleanup_sessions( &session, NULL, NULL, host, port, nof_sessions, args_info.verbose_given > 0 );
exit( EXIT_FAILURE );
}
@@ -938,7 +938,7 @@ int main( int argc, char *argv[] )
case CSSH_AUTH_DONE_FAILED:
// one authentication failed, bail out for now
- fprintf( stderr, "ERROR: authentication failed for one host ('%s'), aborting now", host[i] );
+ fprintf( stderr, "ERROR: authentication failed for one host ('%s'), aborting now\n", host[i] );
cleanup_sessions( &session, NULL, NULL, host, port, nof_sessions, args_info.verbose_given > 0 );
exit( EXIT_FAILURE );
}
@@ -990,7 +990,7 @@ CLI_NEXT_CMD:
ssh_data_t *ssh_data = (ssh_data_t *)malloc( ( nof_sessions + 1 ) * sizeof( ssh_data_t ) );
if( ssh_data == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed for ssh_data array" );
+ fprintf( stderr, "ERROR: Memory allocation failed for ssh_data array\n" );
cleanup_sessions( &session, NULL, NULL, host, port, nof_sessions, args_info.verbose_given > 0 );
exit( EXIT_FAILURE );
}
@@ -1032,13 +1032,13 @@ CLI_NEXT_CMD:
ssh_data[i].is_eof = false;
ssh_data[i].stdout_buf = (char *)malloc( BUFSIZE );
if( ssh_data[i].stdout_buf == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed for receiving buffers of ssh_channels" );
+ fprintf( stderr, "ERROR: Memory allocation failed for receiving buffers of ssh_channels\n" );
cleanup_sessions( &session, &ssh_data, NULL, host, port, nof_sessions, args_info.verbose_given > 0 );
exit( EXIT_FAILURE );
}
ssh_data[i].stderr_buf = (char *)malloc( BUFSIZE );
if( ssh_data[i].stderr_buf == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed for receiving buffers of ssh_channels" );
+ fprintf( stderr, "ERROR: Memory allocation failed for receiving buffers of ssh_channels\n" );
cleanup_sessions( &session, &ssh_data, NULL, host, port, nof_sessions, args_info.verbose_given > 0 );
exit( EXIT_FAILURE );
}
@@ -1156,7 +1156,7 @@ SHELL_EOF:
scp_data_t *scp_data = (scp_data_t *)malloc( ( nof_sessions + 1 ) * sizeof( scp_data_t ) );
if( scp_data == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed for scp_data array" );
+ fprintf( stderr, "ERROR: Memory allocation failed for scp_data array\n" );
cleanup_sessions( &session, NULL, NULL, host, port, nof_sessions, args_info.verbose_given > 0 );
exit( EXIT_FAILURE );
}
@@ -1191,7 +1191,7 @@ SHELL_EOF:
for( unsigned int i = 0; i < nof_sessions; i++ ) {
scp_data[i].buf = (char *)malloc( BUFSIZE );
if( scp_data[i].buf == NULL ) {
- fprintf( stderr, "ERROR: Memory allocation failed for receiving buffers of ssh_scp" );
+ fprintf( stderr, "ERROR: Memory allocation failed for receiving buffers of ssh_scp\n" );
cleanup_sessions( &session, NULL, &scp_data, host, port, nof_sessions, args_info.verbose_given > 0 );
exit( EXIT_FAILURE );
}