Rationalize other snprintf() uses

This commit is contained in:
Manuel Pégourié-Gonnard 2015-06-22 11:50:58 +02:00
parent 1685368408
commit 9dbaf400ef
5 changed files with 44 additions and 121 deletions

View file

@ -42,10 +42,6 @@
#include <stdio.h>
HEADER_INCLUDED
#if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \
!defined(EFI32)
#define snprintf _snprintf
#endif
void mbedtls_strerror( int ret, char *buf, size_t buflen )
{
@ -56,8 +52,6 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
return;
memset( buf, 0x00, buflen );
/* Reduce buflen to make sure MSVC _snprintf() ends with \0 as well */
buflen -= 1;
if( ret < 0 )
ret = -ret;