Andrew Talbot : winhttp: Remove unused variables.

Alexandre Julliard julliard at winehq.org
Fri Nov 23 12:53:23 CST 2012


Module: wine
Branch: master
Commit: 4be1fce0d113a6a2dc246dfe797a68fe68844dfb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4be1fce0d113a6a2dc246dfe797a68fe68844dfb

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Thu Nov 22 21:02:02 2012 +0000

winhttp: Remove unused variables.

---

 dlls/winhttp/net.c     |    3 +--
 dlls/winhttp/request.c |    8 +++-----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 5ec4e1a..ff0b0ff 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -927,14 +927,13 @@ BOOL netconn_get_next_line( netconn_t *conn, char *buffer, DWORD *buflen )
 
 DWORD netconn_set_timeout( netconn_t *netconn, BOOL send, int value )
 {
-    int res;
     struct timeval tv;
 
     /* value is in milliseconds, convert to struct timeval */
     tv.tv_sec = value / 1000;
     tv.tv_usec = (value % 1000) * 1000;
 
-    if ((res = setsockopt( netconn->socket, SOL_SOCKET, send ? SO_SNDTIMEO : SO_RCVTIMEO, (void*)&tv, sizeof(tv) ) == -1))
+    if (setsockopt( netconn->socket, SOL_SOCKET, send ? SO_SNDTIMEO : SO_RCVTIMEO, (void*)&tv, sizeof(tv) ) == -1)
     {
         WARN("setsockopt failed (%s)\n", strerror( errno ));
         return sock_get_error( errno );
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index 7c0d3ab..0d44ed1 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -2814,7 +2814,7 @@ static DWORD wait_for_completion( struct winhttp_request *request )
 
 static HRESULT request_receive( struct winhttp_request *request )
 {
-    DWORD err, size, total_bytes_read, buflen = 4096;
+    DWORD err, size, buflen = 4096;
 
     wait_set_status_callback( request, WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE );
     if (!WinHttpReceiveResponse( request->hrequest, NULL ))
@@ -2829,7 +2829,7 @@ static HRESULT request_receive( struct winhttp_request *request )
     }
     if (!(request->buffer = heap_alloc( buflen ))) return E_OUTOFMEMORY;
     request->buffer[0] = 0;
-    size = total_bytes_read = 0;
+    size = 0;
     do
     {
         wait_set_status_callback( request, WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE );
@@ -2860,7 +2860,6 @@ static HRESULT request_receive( struct winhttp_request *request )
             goto error;
         }
         if ((err = wait_for_completion( request ))) goto error;
-        total_bytes_read += request->bytes_read;
         request->offset += request->bytes_read;
     } while (request->bytes_read);
 
@@ -2913,7 +2912,6 @@ static HRESULT request_send( struct winhttp_request *request )
     char *ptr = NULL;
     LONG size = 0;
     HRESULT hr;
-    BOOL ret;
     DWORD err;
 
     if ((err = request_set_parameters( request ))) return HRESULT_FROM_WIN32( err );
@@ -2952,7 +2950,7 @@ static HRESULT request_send( struct winhttp_request *request )
         }
     }
     wait_set_status_callback( request, WINHTTP_CALLBACK_STATUS_REQUEST_SENT );
-    if (!(ret = WinHttpSendRequest( request->hrequest, NULL, 0, ptr, size, size, 0 )))
+    if (!WinHttpSendRequest( request->hrequest, NULL, 0, ptr, size, size, 0 ))
     {
         err = get_last_error();
         goto error;




More information about the wine-cvs mailing list