Explicit conversions and minor changes to prevent MSVC compiler warnings

This commit is contained in:
Paul Bakker 2013-10-11 18:58:55 +02:00 committed by Paul Bakker
parent b887f1119e
commit b9cfaa0c7f
21 changed files with 111 additions and 79 deletions

View file

@ -42,8 +42,13 @@ void polarssl_strerror( int ret, char *buf, size_t buflen )
size_t len;
int use_ret;
if( buflen == 0 )
return;
memset( buf, 0x00, buflen );
/* Reduce buflen to make sure MSVC _snprintf() ends with \0 as well */
buflen -= 1;
if( ret < 0 )
ret = -ret;