From 3aeb49c7c51c8d1063bc52e3104b0f3cef6b56db Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Fri, 25 Apr 2008 22:32:15 +0000 Subject: minor fix to some simple signedness errors --- src/common/socket.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/socket.c b/src/common/socket.c index 1711286..4543b6a 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -140,7 +140,7 @@ static int connect_client(int listen_fd) { int fd; struct sockaddr_in client_address; - int len; + unsigned int len; int result; int yes = 1; // reuse fix @@ -176,8 +176,8 @@ static int connect_client(int listen_fd) #endif CREATE(session[fd], struct socket_data, 1); - CREATE(session[fd]->rdata, char, rfifo_size); - CREATE(session[fd]->wdata, char, wfifo_size); + CREATE(session[fd]->rdata, unsigned char, rfifo_size); + CREATE(session[fd]->wdata, unsigned char, wfifo_size); session[fd]->max_rdata = rfifo_size; session[fd]->max_wdata = wfifo_size; @@ -283,8 +283,8 @@ int make_connection(long ip,int port) FD_SET(fd,&readfds); CREATE(session[fd], struct socket_data, 1); - CREATE(session[fd]->rdata, char, rfifo_size); - CREATE(session[fd]->wdata, char, wfifo_size); + CREATE(session[fd]->rdata, unsigned char, rfifo_size); + CREATE(session[fd]->wdata, unsigned char, wfifo_size); session[fd]->max_rdata = rfifo_size; session[fd]->max_wdata = wfifo_size; @@ -318,11 +318,11 @@ int realloc_fifo(int fd,int rfifo_size,int wfifo_size) { struct socket_data *s=session[fd]; if( s->max_rdata != rfifo_size && s->rdata_size < rfifo_size){ - RECREATE(s->rdata, char, rfifo_size); + RECREATE(s->rdata, unsigned char, rfifo_size); s->max_rdata = rfifo_size; } if( s->max_wdata != wfifo_size && s->wdata_size < wfifo_size){ - RECREATE(s->wdata, char, wfifo_size); + RECREATE(s->wdata, unsigned char, wfifo_size); s->max_wdata = wfifo_size; } return 0; -- cgit v1.2.3-70-g09d2