mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-02-19 08:43:02 +00: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