Module: wine Branch: refs/heads/master Commit: 92ddc1c851a01773221d3863dbad38a344630b0a URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=92ddc1c851a01773221d3863...
Author: Mike McCormack mike@codeweavers.com Date: Thu Mar 30 18:20:04 2006 +0900
wininet: Clean up HTTP_GetCustomHeaderIndex.
---
dlls/wininet/http.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 1e32e4c..e93a4d7 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2988,7 +2988,8 @@ static void HTTP_CloseHTTPSessionHandle( * Return index of custom header from header array * */ -static INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField,int requested_index, BOOL request_only) +static INT HTTP_GetCustomHeaderIndex(LPWININETHTTPREQW lpwhr, LPCWSTR lpszField, + int requested_index, BOOL request_only) { DWORD index;
@@ -2996,19 +2997,18 @@ static INT HTTP_GetCustomHeaderIndex(LPW
for (index = 0; index < lpwhr->nCustHeaders; index++) { - if (!strcmpiW(lpwhr->pCustHeaders[index].lpszField, lpszField)) - { - if ((request_only && - !(lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST))|| - (!request_only && - (lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST))) + if (strcmpiW(lpwhr->pCustHeaders[index].lpszField, lpszField)) + continue; + + if (request_only && !(lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST)) + continue; + + if (!request_only && (lpwhr->pCustHeaders[index].wFlags & HDR_ISREQUEST)) continue;
if (requested_index == 0) - break; - else - requested_index --; - } + break; + requested_index --; }
if (index >= lpwhr->nCustHeaders)