mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
modify programs/*.c to use polarssl_snprintf
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_snprintf snprintf
|
||||
#define polarssl_printf printf
|
||||
#define polarssl_fprintf fprintf
|
||||
#endif
|
||||
@ -1197,7 +1198,7 @@ send_request:
|
||||
polarssl_printf( " > Write to server:" );
|
||||
fflush( stdout );
|
||||
|
||||
len = snprintf( (char *) buf, sizeof(buf) - 1, GET_REQUEST,
|
||||
len = polarssl_snprintf( (char *) buf, sizeof(buf) - 1, GET_REQUEST,
|
||||
opt.request_page );
|
||||
tail_len = strlen( GET_REQUEST_END );
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_snprintf snprintf
|
||||
#define polarssl_printf printf
|
||||
#define polarssl_fprintf fprintf
|
||||
#endif
|
||||
@ -137,7 +138,7 @@ static void *handle_ssl_connection( void *data )
|
||||
memset( &ssl, 0, sizeof( ssl_context ) );
|
||||
memset( &ctr_drbg, 0, sizeof( ctr_drbg_context ) );
|
||||
|
||||
snprintf( pers, sizeof(pers), "SSL Pthread Thread %d", thread_id );
|
||||
polarssl_snprintf( pers, sizeof(pers), "SSL Pthread Thread %d", thread_id );
|
||||
polarssl_printf( " [ #%d ] Client FD %d\n", thread_id, client_fd );
|
||||
polarssl_printf( " [ #%d ] Seeding the random number generator...\n", thread_id );
|
||||
|
||||
|
Reference in New Issue
Block a user