mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Rationalize other snprintf() uses
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user