Nikolay Sivov : wininet: Make sure we pass strictly 0/ 1 to a helper as BOOL value.

Alexandre Julliard julliard at wine.codeweavers.com
Thu May 14 06:22:35 CDT 2015


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed May 13 17:55:27 2015 +0300

wininet: Make sure we pass strictly 0/1 to a helper as BOOL value.

---

 dlls/wininet/http.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index f91fd21..cd2cdcf 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -3565,7 +3565,7 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *request, DWORD dwInfoLevel,
         LPVOID lpBuffer, LPDWORD lpdwBufferLength, LPDWORD lpdwIndex)
 {
     LPHTTPHEADERW lphttpHdr = NULL;
-    BOOL request_only = dwInfoLevel & HTTP_QUERY_FLAG_REQUEST_HEADERS;
+    BOOL request_only = !!(dwInfoLevel & HTTP_QUERY_FLAG_REQUEST_HEADERS);
     INT requested_index = lpdwIndex ? *lpdwIndex : 0;
     DWORD level = (dwInfoLevel & ~HTTP_QUERY_MODIFIER_FLAGS_MASK);
     INT index = -1;
@@ -6102,7 +6102,7 @@ static DWORD HTTP_ProcessHeader(http_request_t *request, LPCWSTR field, LPCWSTR
 {
     LPHTTPHEADERW lphttpHdr = NULL;
     INT index;
-    BOOL request_only = dwModifier & HTTP_ADDHDR_FLAG_REQ;
+    BOOL request_only = !!(dwModifier & HTTP_ADDHDR_FLAG_REQ);
     DWORD res = ERROR_HTTP_INVALID_HEADER;
 
     TRACE("--> %s: %s - 0x%08x\n", debugstr_w(field), debugstr_w(value), dwModifier);




More information about the wine-cvs mailing list