diff options
Diffstat (limited to '')
-rw-r--r-- | src/libmpdclient.c | 4 | ||||
-rw-r--r-- | src/libmpdclient.h | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/libmpdclient.c b/src/libmpdclient.c index 0733ccad1..675521f3b 100644 --- a/src/libmpdclient.c +++ b/src/libmpdclient.c @@ -417,7 +417,7 @@ mpd_Connection * mpd_newConnection(const char * host, int port, float timeout) { FD_ZERO(&fds); FD_SET(connection->sock,&fds); if((err = select(connection->sock+1,&fds,NULL,NULL,&tv)) == 1) { - int readed; + ssize_t readed; readed = recv(connection->sock, &(connection->buffer[connection->buflen]), MPD_BUFFER_MAX_LENGTH-connection->buflen,0); @@ -540,7 +540,7 @@ static void mpd_getNextReturnElement(mpd_Connection * connection) { fd_set fds; struct timeval tv; char * tok = NULL; - int readed; + ssize_t readed; char * bufferCheck = NULL; int err; int pos; diff --git a/src/libmpdclient.h b/src/libmpdclient.h index 910699445..e91013b9c 100644 --- a/src/libmpdclient.h +++ b/src/libmpdclient.h @@ -40,7 +40,8 @@ #endif #include <sys/time.h> -#include <stdarg.h> +#include <stddef.h> + #define MPD_BUFFER_MAX_LENGTH 50000 #define MPD_WELCOME_MESSAGE "OK MPD " @@ -117,8 +118,8 @@ typedef struct _mpd_Connection { /* DON'T TOUCH any of the rest of this stuff */ int sock; char buffer[MPD_BUFFER_MAX_LENGTH+1]; - int buflen; - int bufstart; + size_t buflen; + size_t bufstart; int doneProcessing; int listOks; int doneListOk; |