Commit 06afdda6 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wininet: Simplify while loop conditions (PVS-Studio).

parent 7f295eff
...@@ -809,7 +809,7 @@ static void strip_spaces(LPWSTR start) ...@@ -809,7 +809,7 @@ static void strip_spaces(LPWSTR start)
LPWSTR str = start; LPWSTR str = start;
LPWSTR end; LPWSTR end;
while (*str == ' ' && *str != '\0') while (*str == ' ')
str++; str++;
if (str != start) if (str != start)
...@@ -841,13 +841,13 @@ static inline BOOL is_basic_auth_value( LPCWSTR pszAuthValue, LPWSTR *pszRealm ) ...@@ -841,13 +841,13 @@ static inline BOOL is_basic_auth_value( LPCWSTR pszAuthValue, LPWSTR *pszRealm )
if (!token) if (!token)
return TRUE; return TRUE;
realm = ptr; realm = ptr;
while (*realm == ' ' && *realm != '\0') while (*realm == ' ')
realm++; realm++;
if(!strncmpiW(realm, szRealm, ARRAYSIZE(szRealm)) && if(!strncmpiW(realm, szRealm, ARRAYSIZE(szRealm)) &&
(realm[ARRAYSIZE(szRealm)] == ' ' || realm[ARRAYSIZE(szRealm)] == '=')) (realm[ARRAYSIZE(szRealm)] == ' ' || realm[ARRAYSIZE(szRealm)] == '='))
{ {
token++; token++;
while (*token == ' ' && *token != '\0') while (*token == ' ')
token++; token++;
if (*token == '\0') if (*token == '\0')
return TRUE; return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment