Michael Stefaniuc : rpcrt4: Avoid a variable holding an ARRAY_SIZE result.
Alexandre Julliard
julliard at winehq.org
Fri Oct 19 16:07:38 CDT 2018
Module: wine
Branch: master
Commit: 5ee8a6530bd8e71555d7104d74c1fcba237329f1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5ee8a6530bd8e71555d7104d74c1fcba237329f1
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Fri Oct 19 22:11:33 2018 +0200
rpcrt4: Avoid a variable holding an ARRAY_SIZE result.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard 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 4fd091c..26641fd 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;
More information about the wine-cvs
mailing list