mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
modify scripts/* and tests/* to use polarssl_snprintf
This commit is contained in:
@ -30,6 +30,12 @@
|
||||
#include "polarssl/error.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_snprintf snprintf
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_ERROR_C)
|
||||
|
||||
HEADER_INCLUDED
|
||||
@ -67,7 +73,7 @@ HIGH_LEVEL_CODE_CHECKS
|
||||
// END generated code
|
||||
|
||||
if( strlen( buf ) == 0 )
|
||||
snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret );
|
||||
polarssl_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret );
|
||||
}
|
||||
|
||||
use_ret = ret & ~0xFF80;
|
||||
@ -85,7 +91,7 @@ HIGH_LEVEL_CODE_CHECKS
|
||||
if( buflen - len < 5 )
|
||||
return;
|
||||
|
||||
snprintf( buf + len, buflen - len, " : " );
|
||||
polarssl_snprintf( buf + len, buflen - len, " : " );
|
||||
|
||||
buf += len + 3;
|
||||
buflen -= len + 3;
|
||||
@ -100,7 +106,7 @@ LOW_LEVEL_CODE_CHECKS
|
||||
if( strlen( buf ) != 0 )
|
||||
return;
|
||||
|
||||
snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret );
|
||||
polarssl_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret );
|
||||
}
|
||||
|
||||
#if defined(POLARSSL_ERROR_STRERROR_BC)
|
||||
|
Reference in New Issue
Block a user