summaryrefslogtreecommitdiffstats
path: root/libvncserver/sockets.c
diff options
context:
space:
mode:
authordscho <dscho>2005-05-15 13:57:51 +0000
committerdscho <dscho>2005-05-15 13:57:51 +0000
commit8bee4eb990273c3654431467ba6618eb916f030a (patch)
treef3077e1cb12a4cb778047814583fc0b2f26bb7b2 /libvncserver/sockets.c
parentbe5b1296e4aa4d8a51cd709853408ec0cd7b768b (diff)
downloadlibtdevnc-8bee4eb990273c3654431467ba6618eb916f030a.tar.gz
libtdevnc-8bee4eb990273c3654431467ba6618eb916f030a.zip
ANSIfy, fix some warnings from Linus' sparse
Diffstat (limited to 'libvncserver/sockets.c')
-rwxr-xr-xlibvncserver/sockets.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c
index 9025df8..24a787d 100755
--- a/libvncserver/sockets.c
+++ b/libvncserver/sockets.c
@@ -216,7 +216,7 @@ rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec)
fd_set fds;
struct timeval tv;
struct sockaddr_in addr;
- size_t addrlen = sizeof(addr);
+ socklen_t addrlen = sizeof(addr);
char buf[6];
const int one = 1;
int sock;
@@ -342,8 +342,7 @@ rfbDisconnectUDPSock(rfbScreenInfoPtr rfbScreen)
void
-rfbCloseClient(cl)
- rfbClientPtr cl;
+rfbCloseClient(rfbClientPtr cl)
{
LOCK(cl->updateMutex);
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
@@ -371,10 +370,9 @@ rfbCloseClient(cl)
*/
int
-rfbConnect(rfbScreen, host, port)
- rfbScreenInfoPtr rfbScreen;
- char *host;
- int port;
+rfbConnect(rfbScreenInfoPtr rfbScreen,
+ char *host,
+ int port)
{
int sock;
int one = 1;
@@ -476,10 +474,9 @@ int rfbReadExact(rfbClientPtr cl,char* buf,int len)
*/
int
-rfbWriteExact(cl, buf, len)
- rfbClientPtr cl;
- const char *buf;
- int len;
+rfbWriteExact(rfbClientPtr cl,
+ const char *buf,
+ int len)
{
int sock = cl->sock;
int n;
@@ -573,9 +570,8 @@ rfbStringToAddr(char *str, in_addr_t *addr) {
}
int
-rfbListenOnTCPPort(port, iface)
- int port;
- in_addr_t iface;
+rfbListenOnTCPPort(int port,
+ in_addr_t iface)
{
struct sockaddr_in addr;
int sock;
@@ -607,9 +603,8 @@ rfbListenOnTCPPort(port, iface)
}
int
-rfbConnectToTcpAddr(host, port)
- char *host;
- int port;
+rfbConnectToTcpAddr(char *host,
+ int port)
{
struct hostent *hp;
int sock;
@@ -641,9 +636,8 @@ rfbConnectToTcpAddr(host, port)
}
int
-rfbListenOnUDPPort(port, iface)
- int port;
- in_addr_t iface;
+rfbListenOnUDPPort(int port,
+ in_addr_t iface)
{
struct sockaddr_in addr;
int sock;