diff options
author | Daniel Cohen Gindi <danielgindi@gmail.com> | 2014-09-20 16:57:22 +0300 |
---|---|---|
committer | Daniel Cohen Gindi <danielgindi@gmail.com> | 2014-09-20 17:46:32 +0300 |
commit | 026c48e7fc13a4a8ada0d686cc2b111043dbc2fa (patch) | |
tree | e6b0bfbbb79a93a7feeb1b746b961127a8e336fb /libvncserver/sockets.c | |
parent | 7f8520d05c526e1402c69243d0372ca466d1c663 (diff) | |
download | libtdevnc-026c48e7fc13a4a8ada0d686cc2b111043dbc2fa.tar.gz libtdevnc-026c48e7fc13a4a8ada0d686cc2b111043dbc2fa.zip |
Fixed a violation of the C89 standard ("declarations must come before instructions")
Diffstat (limited to 'libvncserver/sockets.c')
-rw-r--r-- | libvncserver/sockets.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c index 6c225e9..31dddd6 100644 --- a/libvncserver/sockets.c +++ b/libvncserver/sockets.c @@ -455,11 +455,13 @@ rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen) #endif #ifdef LIBVNCSERVER_IPv6 - char host[1024]; - if(getnameinfo((struct sockaddr*)&addr, addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST) != 0) { - rfbLogPerror("rfbProcessNewConnection: error in getnameinfo"); + { + char host[1024]; + if(getnameinfo((struct sockaddr*)&addr, addrlen, host, sizeof(host), NULL, 0, NI_NUMERICHOST) != 0) { + rfbLogPerror("rfbProcessNewConnection: error in getnameinfo"); + } + rfbLog("Got connection from client %s\n", host); } - rfbLog("Got connection from client %s\n", host); #else rfbLog("Got connection from client %s\n", inet_ntoa(addr.sin_addr)); #endif |