Added return value checking for correctness in programs

This commit is contained in:
Paul Bakker 2014-04-17 16:00:59 +02:00
parent 4f42c11846
commit cbe3d0d5cc
4 changed files with 58 additions and 14 deletions

View file

@ -273,7 +273,13 @@ static int ssl_test( struct options *opt )
ssl_set_ciphersuites( &ssl, opt->force_ciphersuite );
if( opt->iomode == IOMODE_NONBLOCK )
net_set_nonblock( client_fd );
{
if( ( ret = net_set_nonblock( client_fd ) ) != 0 )
{
printf( " ! net_set_nonblock returned %d\n\n", ret );
return( ret );
}
}
read_buf = (unsigned char *) malloc( opt->buffer_size );
write_buf = (unsigned char *) malloc( opt->buffer_size );