From: Michael Stefaniuc Subject: [PATCH 1/3] rpcrt4: Avoid a variable holding an ARRAY_SIZE result Message-Id: <20181019201135.8526-1-mstefani@winehq.org> Date: Fri, 19 Oct 2018 22:11:33 +0200 Signed-off-by: Michael Stefaniuc --- 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