Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
377243b4
Commit
377243b4
authored
Oct 19, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Use the standard ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ac0c0062
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+12
-14
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
377243b4
...
...
@@ -54,8 +54,6 @@
#define DEFAULT_NCACN_HTTP_TIMEOUT (60 * 1000)
#define ARRAYSIZE(a) (sizeof((a)) / sizeof((a)[0]))
WINE_DEFAULT_DEBUG_CHANNEL
(
rpc
);
static
RpcConnection
*
rpcrt4_spawn_connection
(
RpcConnection
*
old_connection
);
...
...
@@ -2397,11 +2395,11 @@ static const struct
}
auth_schemes
[]
=
{
{
basicW
,
ARRAYSIZE
(
basicW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_BASIC
},
{
ntlmW
,
ARRAYSIZE
(
ntlmW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_NTLM
},
{
passportW
,
ARRAYSIZE
(
passportW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_PASSPORT
},
{
digestW
,
ARRAYSIZE
(
digestW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_DIGEST
},
{
negotiateW
,
ARRAYSIZE
(
negotiateW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE
}
{
basicW
,
ARRAY
_
SIZE
(
basicW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_BASIC
},
{
ntlmW
,
ARRAY
_
SIZE
(
ntlmW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_NTLM
},
{
passportW
,
ARRAY
_
SIZE
(
passportW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_PASSPORT
},
{
digestW
,
ARRAY
_
SIZE
(
digestW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_DIGEST
},
{
negotiateW
,
ARRAY
_
SIZE
(
negotiateW
)
-
1
,
RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE
}
};
static
DWORD
auth_scheme_from_header
(
const
WCHAR
*
header
)
...
...
@@ -3260,7 +3258,7 @@ static const struct protseq_ops protseq_list[] =
const
struct
protseq_ops
*
rpcrt4_get_protseq_ops
(
const
char
*
protseq
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
ARRAY
SIZE
(
protseq_list
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_
SIZE
(
protseq_list
);
i
++
)
if
(
!
strcmp
(
protseq_list
[
i
].
name
,
protseq
))
return
&
protseq_list
[
i
];
return
NULL
;
...
...
@@ -3269,7 +3267,7 @@ const struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq)
static
const
struct
connection_ops
*
rpcrt4_get_conn_protseq_ops
(
const
char
*
protseq
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
ARRAY
SIZE
(
conn_protseq_list
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_
SIZE
(
conn_protseq_list
);
i
++
)
if
(
!
strcmp
(
conn_protseq_list
[
i
].
name
,
protseq
))
return
&
conn_protseq_list
[
i
];
return
NULL
;
...
...
@@ -3507,7 +3505,7 @@ RPC_STATUS RpcTransport_ParseTopOfTower(const unsigned char *tower_data,
(
floor4
->
count_lhs
!=
sizeof
(
floor4
->
protid
)))
return
EPT_S_NOT_REGISTERED
;
for
(
i
=
0
;
i
<
ARRAYSIZE
(
conn_protseq_list
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY
_
SIZE
(
conn_protseq_list
);
i
++
)
if
((
protocol_floor
->
protid
==
conn_protseq_list
[
i
].
epm_protocols
[
0
])
&&
(
floor4
->
protid
==
conn_protseq_list
[
i
].
epm_protocols
[
1
]))
{
...
...
@@ -3613,12 +3611,12 @@ RPC_STATUS WINAPI RpcNetworkInqProtseqsW( RPC_PROTSEQ_VECTORW** protseqs )
TRACE
(
"(%p)
\n
"
,
protseqs
);
*
protseqs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
RPC_PROTSEQ_VECTORW
)
+
(
sizeof
(
unsigned
short
*
)
*
ARRAYSIZE
(
protseq_list
)));
*
protseqs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
RPC_PROTSEQ_VECTORW
)
+
(
sizeof
(
unsigned
short
*
)
*
ARRAY
_
SIZE
(
protseq_list
)));
if
(
!*
protseqs
)
goto
end
;
pvector
=
*
protseqs
;
pvector
->
Count
=
0
;
for
(
i
=
0
;
i
<
ARRAYSIZE
(
protseq_list
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY
_
SIZE
(
protseq_list
);
i
++
)
{
pvector
->
Protseq
[
i
]
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlen
(
protseq_list
[
i
].
name
)
+
1
)
*
sizeof
(
unsigned
short
));
if
(
pvector
->
Protseq
[
i
]
==
NULL
)
...
...
@@ -3646,12 +3644,12 @@ RPC_STATUS WINAPI RpcNetworkInqProtseqsA(RPC_PROTSEQ_VECTORA** protseqs)
TRACE
(
"(%p)
\n
"
,
protseqs
);
*
protseqs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
RPC_PROTSEQ_VECTORW
)
+
(
sizeof
(
unsigned
char
*
)
*
ARRAYSIZE
(
protseq_list
)));
*
protseqs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
RPC_PROTSEQ_VECTORW
)
+
(
sizeof
(
unsigned
char
*
)
*
ARRAY
_
SIZE
(
protseq_list
)));
if
(
!*
protseqs
)
goto
end
;
pvector
=
*
protseqs
;
pvector
->
Count
=
0
;
for
(
i
=
0
;
i
<
ARRAYSIZE
(
protseq_list
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY
_
SIZE
(
protseq_list
);
i
++
)
{
pvector
->
Protseq
[
i
]
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
protseq_list
[
i
].
name
)
+
1
);
if
(
pvector
->
Protseq
[
i
]
==
NULL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment