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
39c260e9
Commit
39c260e9
authored
Dec 09, 2007
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Rename the wrappers around HeapAlloc() &Co to use the standard names.
parent
2c80b9d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
localmon.c
dlls/localspl/localmon.c
+9
-9
localspl_private.h
dlls/localspl/localspl_private.h
+3
-3
No files found.
dlls/localspl/localmon.c
View file @
39c260e9
...
...
@@ -143,7 +143,7 @@ static BOOL does_port_exist(LPCWSTR myname)
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
myname
));
id
=
EnumPortsW
(
NULL
,
1
,
NULL
,
0
,
&
needed
,
&
returned
);
pi
=
spl
_alloc
(
needed
);
pi
=
heap
_alloc
(
needed
);
returned
=
0
;
if
(
pi
)
id
=
EnumPortsW
(
NULL
,
1
,
(
LPBYTE
)
pi
,
needed
,
&
needed
,
&
returned
);
...
...
@@ -154,13 +154,13 @@ static BOOL does_port_exist(LPCWSTR myname)
{
if
(
lstrcmpiW
(
myname
,
pi
[
id
].
pName
)
==
0
)
{
TRACE
(
"(%u) found %s
\n
"
,
id
,
debugstr_w
(
pi
[
id
].
pName
));
spl
_free
(
pi
);
heap
_free
(
pi
);
return
TRUE
;
}
}
}
spl
_free
(
pi
);
heap
_free
(
pi
);
return
FALSE
;
}
...
...
@@ -332,7 +332,7 @@ static DWORD get_type_from_local_name(LPCWSTR nameW)
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
myname
));
needed
=
get_ports_from_reg
(
1
,
NULL
,
0
,
&
numentries
);
pi
=
spl
_alloc
(
needed
);
pi
=
heap
_alloc
(
needed
);
if
(
pi
)
needed
=
get_ports_from_reg
(
1
,
(
LPBYTE
)
pi
,
needed
,
&
numentries
);
...
...
@@ -351,7 +351,7 @@ static DWORD get_type_from_local_name(LPCWSTR nameW)
id
=
(
myname
)
?
get_type_from_name
(
myname
)
:
PORT_IS_UNKNOWN
;
spl
_free
(
pi
);
heap
_free
(
pi
);
return
id
;
}
...
...
@@ -433,7 +433,7 @@ static BOOL WINAPI localmon_ClosePort(HANDLE hPort)
EnterCriticalSection
(
&
port_handles_cs
);
list_remove
(
&
port
->
entry
);
LeaveCriticalSection
(
&
port_handles_cs
);
spl
_free
(
port
);
heap
_free
(
port
);
return
TRUE
;
}
...
...
@@ -526,7 +526,7 @@ static BOOL WINAPI localmon_OpenPortW(LPWSTR pName, PHANDLE phPort)
if
(
!
type
)
return
FALSE
;
len
=
(
lstrlenW
(
pName
)
+
1
)
*
sizeof
(
WCHAR
);
port
=
spl
_alloc
(
sizeof
(
port_t
)
+
len
);
port
=
heap
_alloc
(
sizeof
(
port_t
)
+
len
);
if
(
!
port
)
return
FALSE
;
port
->
type
=
type
;
...
...
@@ -563,7 +563,7 @@ static BOOL WINAPI localmon_XcvClosePort(HANDLE hXcv)
EnterCriticalSection
(
&
xcv_handles_cs
);
list_remove
(
&
xcv
->
entry
);
LeaveCriticalSection
(
&
xcv_handles_cs
);
spl
_free
(
xcv
);
heap
_free
(
xcv
);
return
TRUE
;
}
...
...
@@ -740,7 +740,7 @@ static BOOL WINAPI localmon_XcvOpenPort(LPCWSTR pName, ACCESS_MASK GrantedAccess
TRACE
(
"%s, 0x%x, %p)
\n
"
,
debugstr_w
(
pName
),
GrantedAccess
,
phXcv
);
/* No checks for any field is done in Windows */
len
=
(
lstrlenW
(
pName
)
+
1
)
*
sizeof
(
WCHAR
);
xcv
=
spl
_alloc
(
sizeof
(
xcv_t
)
+
len
);
xcv
=
heap
_alloc
(
sizeof
(
xcv_t
)
+
len
);
if
(
xcv
)
{
xcv
->
GrantedAccess
=
GrantedAccess
;
memcpy
(
&
xcv
->
nameW
,
pName
,
len
);
...
...
dlls/localspl/localspl_private.h
View file @
39c260e9
...
...
@@ -49,14 +49,14 @@ extern HINSTANCE LOCALSPL_hInstance;
#define PORT_IS_LPR 8
/* ## Memory allocation
macro
s ## */
/* ## Memory allocation
function
s ## */
static
inline
void
*
spl
_alloc
(
size_t
len
)
static
inline
void
*
heap
_alloc
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
static
inline
BOOL
spl
_free
(
void
*
mem
)
static
inline
BOOL
heap
_free
(
void
*
mem
)
{
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
}
...
...
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