From fbc958adeb7762b02aa37b52e60c8d569768291e Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 27 Aug 2010 21:20:03 +0200 Subject: [PATCH] player: make port unsigned short TCP ports are unsigned 16 bit integer, so let's use a more natural type for it. --- sync/device.c | 4 ++-- sync/sync.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sync/device.c b/sync/device.c index e8730d2..26e1186 100644 --- a/sync/device.c +++ b/sync/device.c @@ -20,7 +20,7 @@ static const char *sync_track_path(const char *base, const char *name) #ifndef SYNC_PLAYER -static SOCKET server_connect(const char *host, int nport) +static SOCKET server_connect(const char *host, unsigned short nport) { struct hostent *he; struct sockaddr_in sa; @@ -222,7 +222,7 @@ static int purge_and_rerequest(struct sync_device *d) return 0; } -int sync_connect(struct sync_device *d, const char *host, int port) +int sync_connect(struct sync_device *d, const char *host, unsigned short port) { if (d->sock != INVALID_SOCKET) closesocket(d->sock); diff --git a/sync/sync.h b/sync/sync.h index c77c40e..d571ec1 100644 --- a/sync/sync.h +++ b/sync/sync.h @@ -23,7 +23,7 @@ struct sync_cb { }; void sync_set_callbacks(struct sync_device *, struct sync_cb *, void *); #define SYNC_DEFAULT_PORT 1338 -int sync_connect(struct sync_device *, const char *, int port); +int sync_connect(struct sync_device *, const char *, unsigned short); int sync_update(struct sync_device *, int); #endif /* !defined(SYNC_PLAYER) */