modify scripts/* and tests/* to use polarssl_snprintf

This commit is contained in:
Rich Evans 2015-01-30 11:18:42 +00:00
parent 783d9d1c3e
commit 6aa04bcd85
3 changed files with 15 additions and 9 deletions

View file

@ -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)