Rationalize other snprintf() uses
This commit is contained in:
parent
1685368408
commit
9dbaf400ef
5 changed files with 44 additions and 121 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue