[PATCH 1/3] rpcrt4: Avoid a variable holding an ARRAY_SIZE result
Michael Stefaniuc
mstefani at winehq.org
Fri Oct 19 15:11:33 CDT 2018
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/rpcrt4/rpc_transport.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 4fd091ce6a..26641fd274 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -2403,12 +2403,11 @@ auth_schemes[] =
{ digestW, ARRAYSIZE(digestW) - 1, RPC_C_HTTP_AUTHN_SCHEME_DIGEST },
{ negotiateW, ARRAYSIZE(negotiateW) - 1, RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE }
};
-static const unsigned int num_auth_schemes = sizeof(auth_schemes)/sizeof(auth_schemes[0]);
static DWORD auth_scheme_from_header( const WCHAR *header )
{
unsigned int i;
- for (i = 0; i < num_auth_schemes; i++)
+ for (i = 0; i < ARRAY_SIZE(auth_schemes); i++)
{
if (!strncmpiW( header, auth_schemes[i].str, auth_schemes[i].len ) &&
(header[auth_schemes[i].len] == ' ' || !header[auth_schemes[i].len])) return auth_schemes[i].scheme;
--
2.14.4
More information about the wine-devel
mailing list