Mike McCormack : wininet: Clean up HTTP_GetCustomHeaderIndex.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Mar 30 05:44:03 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 92ddc1c851a01773221d3863dbad38a344630b0a
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=92ddc1c851a01773221d3863dbad38a344630b0a
Author: Mike McCormack <mike at 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)
More information about the wine-cvs
mailing list