diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-07-29 12:27:00 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 22:36:34 +0000 |
commit | e7c06719510940898e1f7f8215f4137202611308 (patch) | |
tree | 0aec0bf91daa568d8cb4a1c412037ca26b2f92a6 /src/qcommon/net_ip.c | |
parent | 76544bcec46127587d183a90e5ff817a71e1f139 (diff) |
Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings
Diffstat (limited to 'src/qcommon/net_ip.c')
-rw-r--r-- | src/qcommon/net_ip.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/qcommon/net_ip.c b/src/qcommon/net_ip.c index 2a93b0c4..815b004c 100644 --- a/src/qcommon/net_ip.c +++ b/src/qcommon/net_ip.c @@ -1070,7 +1070,6 @@ NET_OpenSocks */ void NET_OpenSocks( int port ) { struct sockaddr_in address; - int err; struct hostent *h; int len; qboolean rfc1929; @@ -1081,14 +1080,12 @@ void NET_OpenSocks( int port ) { Com_Printf( "Opening connection to SOCKS server.\n" ); if ( ( socks_socket = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP ) ) == INVALID_SOCKET ) { - err = socketError; Com_Printf( "WARNING: NET_OpenSocks: socket: %s\n", NET_ErrorString() ); return; } h = gethostbyname( net_socksServer->string ); if ( h == NULL ) { - err = socketError; Com_Printf( "WARNING: NET_OpenSocks: gethostbyname: %s\n", NET_ErrorString() ); return; } @@ -1101,7 +1098,6 @@ void NET_OpenSocks( int port ) { address.sin_port = htons( (short)net_socksPort->integer ); if ( connect( socks_socket, (struct sockaddr *)&address, sizeof( address ) ) == SOCKET_ERROR ) { - err = socketError; Com_Printf( "NET_OpenSocks: connect: %s\n", NET_ErrorString() ); return; } @@ -1129,7 +1125,6 @@ void NET_OpenSocks( int port ) { buf[2] = 2; // method #2 - method id #02: username/password } if ( send( socks_socket, (void *)buf, len, 0 ) == SOCKET_ERROR ) { - err = socketError; Com_Printf( "NET_OpenSocks: send: %s\n", NET_ErrorString() ); return; } @@ -1137,7 +1132,6 @@ void NET_OpenSocks( int port ) { // get the response len = recv( socks_socket, (void *)buf, 64, 0 ); if ( len == SOCKET_ERROR ) { - err = socketError; Com_Printf( "NET_OpenSocks: recv: %s\n", NET_ErrorString() ); return; } @@ -1176,7 +1170,6 @@ void NET_OpenSocks( int port ) { // send it if ( send( socks_socket, (void *)buf, 3 + ulen + plen, 0 ) == SOCKET_ERROR ) { - err = socketError; Com_Printf( "NET_OpenSocks: send: %s\n", NET_ErrorString() ); return; } @@ -1184,7 +1177,6 @@ void NET_OpenSocks( int port ) { // get the response len = recv( socks_socket, (void *)buf, 64, 0 ); if ( len == SOCKET_ERROR ) { - err = socketError; Com_Printf( "NET_OpenSocks: recv: %s\n", NET_ErrorString() ); return; } @@ -1206,7 +1198,6 @@ void NET_OpenSocks( int port ) { *(int *)&buf[4] = INADDR_ANY; *(short *)&buf[8] = htons( (short)port ); // port if ( send( socks_socket, (void *)buf, 10, 0 ) == SOCKET_ERROR ) { - err = socketError; Com_Printf( "NET_OpenSocks: send: %s\n", NET_ErrorString() ); return; } @@ -1214,7 +1205,6 @@ void NET_OpenSocks( int port ) { // get the response len = recv( socks_socket, (void *)buf, 64, 0 ); if( len == SOCKET_ERROR ) { - err = socketError; Com_Printf( "NET_OpenSocks: recv: %s\n", NET_ErrorString() ); return; } |