Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
b9423076
Commit
b9423076
authored
Oct 03, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Oct 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Don't use HEAP_ZERO_MEMORY when most of the fields will be initialised to non-zero values.
parent
64886ebc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+14
-2
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
b9423076
...
@@ -90,7 +90,14 @@ typedef struct _RpcConnection_np
...
@@ -90,7 +90,14 @@ typedef struct _RpcConnection_np
static
RpcConnection
*
rpcrt4_conn_np_alloc
(
void
)
static
RpcConnection
*
rpcrt4_conn_np_alloc
(
void
)
{
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
RpcConnection_np
));
RpcConnection_np
*
npc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
RpcConnection_np
));
if
(
npc
)
{
npc
->
pipe
=
NULL
;
npc
->
thread
=
NULL
;
memset
(
&
npc
->
ovl
,
0
,
sizeof
(
npc
->
ovl
));
}
return
&
npc
->
common
;
}
}
static
RPC_STATUS
rpcrt4_connect_pipe
(
RpcConnection
*
Connection
,
LPCSTR
pname
)
static
RPC_STATUS
rpcrt4_connect_pipe
(
RpcConnection
*
Connection
,
LPCSTR
pname
)
...
@@ -446,7 +453,8 @@ typedef struct _RpcConnection_tcp
...
@@ -446,7 +453,8 @@ typedef struct _RpcConnection_tcp
static
RpcConnection
*
rpcrt4_conn_tcp_alloc
(
void
)
static
RpcConnection
*
rpcrt4_conn_tcp_alloc
(
void
)
{
{
RpcConnection_tcp
*
tcpc
;
RpcConnection_tcp
*
tcpc
;
tcpc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
RpcConnection_tcp
));
tcpc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
RpcConnection_tcp
));
if
(
tcpc
)
tcpc
->
sock
=
-
1
;
tcpc
->
sock
=
-
1
;
return
&
tcpc
->
common
;
return
&
tcpc
->
common
;
}
}
...
@@ -779,13 +787,17 @@ RPC_STATUS RPCRT4_CreateConnection(RpcConnection** Connection, BOOL server,
...
@@ -779,13 +787,17 @@ RPC_STATUS RPCRT4_CreateConnection(RpcConnection** Connection, BOOL server,
return
RPC_S_PROTSEQ_NOT_SUPPORTED
;
return
RPC_S_PROTSEQ_NOT_SUPPORTED
;
NewConnection
=
ops
->
alloc
();
NewConnection
=
ops
->
alloc
();
NewConnection
->
Next
=
NULL
;
NewConnection
->
server
=
server
;
NewConnection
->
server
=
server
;
NewConnection
->
ops
=
ops
;
NewConnection
->
ops
=
ops
;
NewConnection
->
NetworkAddr
=
RPCRT4_strdupA
(
NetworkAddr
);
NewConnection
->
NetworkAddr
=
RPCRT4_strdupA
(
NetworkAddr
);
NewConnection
->
Endpoint
=
RPCRT4_strdupA
(
Endpoint
);
NewConnection
->
Endpoint
=
RPCRT4_strdupA
(
Endpoint
);
NewConnection
->
Used
=
Binding
;
NewConnection
->
Used
=
Binding
;
NewConnection
->
MaxTransmissionSize
=
RPC_MAX_PACKET_SIZE
;
NewConnection
->
MaxTransmissionSize
=
RPC_MAX_PACKET_SIZE
;
memset
(
&
NewConnection
->
ActiveInterface
,
0
,
sizeof
(
NewConnection
->
ActiveInterface
));
NewConnection
->
NextCallId
=
1
;
NewConnection
->
NextCallId
=
1
;
memset
(
&
NewConnection
->
ctx
,
0
,
sizeof
(
NewConnection
->
ctx
));
if
(
AuthInfo
)
RpcAuthInfo_AddRef
(
AuthInfo
);
if
(
AuthInfo
)
RpcAuthInfo_AddRef
(
AuthInfo
);
NewConnection
->
AuthInfo
=
AuthInfo
;
NewConnection
->
AuthInfo
=
AuthInfo
;
list_init
(
&
NewConnection
->
conn_pool_entry
);
list_init
(
&
NewConnection
->
conn_pool_entry
);
...
...
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