Commit 72080674 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

rpcrt4: Simplify some code in RpcServerInqBindings by changing while loops into for loops.

parent 5e1d10d4
......@@ -604,11 +604,8 @@ RPC_STATUS WINAPI RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector )
count = 0;
LIST_FOR_EACH_ENTRY(ps, &protseqs, RpcServerProtseq, entry) {
EnterCriticalSection(&ps->cs);
conn = ps->conn;
while (conn) {
for (conn = ps->conn; conn; conn = conn->Next)
count++;
conn = conn->Next;
}
LeaveCriticalSection(&ps->cs);
}
if (count) {
......@@ -620,12 +617,10 @@ RPC_STATUS WINAPI RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector )
count = 0;
LIST_FOR_EACH_ENTRY(ps, &protseqs, RpcServerProtseq, entry) {
EnterCriticalSection(&ps->cs);
conn = ps->conn;
while (conn) {
for (conn = ps->conn; conn; conn = conn->Next) {
RPCRT4_MakeBinding((RpcBinding**)&(*BindingVector)->BindingH[count],
conn);
count++;
conn = conn->Next;
}
LeaveCriticalSection(&ps->cs);
}
......
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