Andrew Talbot : winhttp: Avoid signed-unsigned integer comparisons.

Alexandre Julliard julliard at winehq.org
Wed Mar 6 13:11:53 CST 2013


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

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Tue Mar  5 22:52:21 2013 +0000

winhttp: Avoid signed-unsigned integer comparisons.

---

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

diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index fa8cad0..5ce7683 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -568,7 +568,7 @@ static BOOL read_ssl_chunk(netconn_t *conn, void *buf, SIZE_T buf_size, SIZE_T *
     SecBuffer bufs[4];
     SecBufferDesc buf_desc = {SECBUFFER_VERSION, sizeof(bufs)/sizeof(*bufs), bufs};
     SSIZE_T size, buf_len;
-    int i;
+    unsigned int i;
     SECURITY_STATUS res;
 
     assert(conn->extra_len < ssl_buf_size);
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index cd583e7..e2c3734 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -2935,9 +2935,9 @@ static HRESULT request_send( struct winhttp_request *request )
         VariantInit( &data );
         if (V_VT( &request->data ) == VT_BSTR)
         {
-            UINT i, cp = CP_ACP;
+            UINT cp = CP_ACP;
             const WCHAR *str = V_BSTR( &request->data );
-            int len = strlenW( str );
+            int i, len = strlenW( str );
 
             for (i = 0; i < len; i++)
             {
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index 41b266a..d43b225 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -878,7 +878,7 @@ static const object_vtbl_t request_vtbl =
 static BOOL store_accept_types( request_t *request, const WCHAR **accept_types )
 {
     const WCHAR **types = accept_types;
-    int i;
+    DWORD i;
 
     if (!types) return TRUE;
     while (*types)
@@ -897,7 +897,7 @@ static BOOL store_accept_types( request_t *request, const WCHAR **accept_types )
     {
         if (!(request->accept_types[i] = strdupW( *types )))
         {
-            for (; i >= 0; i--) heap_free( request->accept_types[i] );
+            for ( ; i > 0; --i) heap_free( request->accept_types[i - 1] );
             heap_free( request->accept_types );
             request->accept_types = NULL;
             request->num_accept_types = 0;




More information about the wine-cvs mailing list