mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-27 17:57:24 +01:00
- Major type rewrite of int to size_t for most variables and arguments used for buffer lengths and loops
This commit is contained in:
parent
1be81a4e5f
commit
23986e5d5d
67 changed files with 1041 additions and 949 deletions
|
|
@ -44,7 +44,8 @@ int main( void )
|
|||
{
|
||||
FILE *f;
|
||||
|
||||
int ret, n, buflen;
|
||||
int ret;
|
||||
size_t n, buflen;
|
||||
int listen_fd = -1;
|
||||
int client_fd = -1;
|
||||
|
||||
|
|
@ -177,7 +178,7 @@ int main( void )
|
|||
buf2[1] = (unsigned char)( buflen );
|
||||
|
||||
if( ( ret = net_send( &client_fd, buf2, 2 ) ) != 2 ||
|
||||
( ret = net_send( &client_fd, buf, buflen ) ) != buflen )
|
||||
( ret = net_send( &client_fd, buf, buflen ) ) != (int) buflen )
|
||||
{
|
||||
printf( " failed\n ! net_send returned %d\n\n", ret );
|
||||
goto exit;
|
||||
|
|
@ -192,7 +193,7 @@ int main( void )
|
|||
memset( buf, 0, sizeof( buf ) );
|
||||
n = dhm.len;
|
||||
|
||||
if( ( ret = net_recv( &client_fd, buf, n ) ) != n )
|
||||
if( ( ret = net_recv( &client_fd, buf, n ) ) != (int) n )
|
||||
{
|
||||
printf( " failed\n ! net_recv returned %d\n\n", ret );
|
||||
goto exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue