aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmpdclient.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-18 00:59:40 +0200
committerMax Kellermann <max@duempel.org>2008-09-18 00:59:40 +0200
commita88a4249b0f8bc7977dc265fade64f8943b70a19 (patch)
treee56ad3b18afa792b7c10e5251b18f3dbaa8af18d /src/libmpdclient.h
parent76c97b279206dbfb75da9047a62e6fcbe20ad64c (diff)
downloadmpd-a88a4249b0f8bc7977dc265fade64f8943b70a19.tar.gz
mpd-a88a4249b0f8bc7977dc265fade64f8943b70a19.tar.xz
mpd-a88a4249b0f8bc7977dc265fade64f8943b70a19.zip
libmpdclient: use size_t and ssize_t
When working with buffer lengths and recv() results, we should declare size_t and ssize_t variables, otherwise the code may fail on 64 bit machines.
Diffstat (limited to 'src/libmpdclient.h')
-rw-r--r--src/libmpdclient.h7
1 files changed, 4 insertions, 3 deletions
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;