- 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

@ -27,6 +27,8 @@
#ifndef POLARSSL_NET_H
#define POLARSSL_NET_H
#include <string.h>
#define POLARSSL_ERR_NET_UNKNOWN_HOST -0x0F00
#define POLARSSL_ERR_NET_SOCKET_FAILED -0x0F10
#define POLARSSL_ERR_NET_CONNECT_FAILED -0x0F20
@ -124,7 +126,7 @@ void net_usleep( unsigned long usec );
* or a non-zero error code; POLARSSL_ERR_NET_TRY_AGAIN
* indicates read() is blocking.
*/
int net_recv( void *ctx, unsigned char *buf, int len );
int net_recv( void *ctx, unsigned char *buf, size_t len );
/**
* \brief Write at most 'len' characters. If no error occurs,
@ -138,7 +140,7 @@ int net_recv( void *ctx, unsigned char *buf, int len );
* or a non-zero error code; POLARSSL_ERR_NET_TRY_AGAIN
* indicates write() is blocking.
*/
int net_send( void *ctx, unsigned char *buf, int len );
int net_send( void *ctx, unsigned char *buf, size_t len );
/**
* \brief Gracefully shutdown the connection