1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03: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:
Paul Bakker
2011-04-24 08:57:21 +00:00
parent 1be81a4e5f
commit 23986e5d5d
67 changed files with 1041 additions and 949 deletions

View File

@ -40,8 +40,8 @@
#pragma comment( lib, "ws2_32.lib" )
#endif
#define read(fd,buf,len) recv(fd,buf,len,0)
#define write(fd,buf,len) send(fd,buf,len,0)
#define read(fd,buf,len) recv(fd,buf,(int) len,0)
#define write(fd,buf,len) send(fd,buf,(int) len,0)
#define close(fd) closesocket(fd)
static int wsa_init_done = 0;
@ -69,7 +69,6 @@ static int wsa_init_done = 0;
#endif
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
@ -289,7 +288,7 @@ void net_usleep( unsigned long usec )
/*
* Read at most 'len' characters
*/
int net_recv( void *ctx, unsigned char *buf, int len )
int net_recv( void *ctx, unsigned char *buf, size_t len )
{
int ret = read( *((int *) ctx), buf, len );
@ -321,7 +320,7 @@ int net_recv( void *ctx, unsigned char *buf, int len )
/*
* Write at most 'len' characters
*/
int net_send( void *ctx, unsigned char *buf, int len )
int net_send( void *ctx, unsigned char *buf, size_t len )
{
int ret = write( *((int *) ctx), buf, len );