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
d6a9082d
Commit
d6a9082d
authored
May 13, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
May 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Replace malloc() with HeapAlloc().
parent
ea58ea76
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
rtlstr.c
dlls/ntdll/tests/rtlstr.c
+5
-5
No files found.
dlls/ntdll/tests/rtlstr.c
View file @
d6a9082d
...
...
@@ -89,7 +89,7 @@ static WCHAR* AtoW( const char* p )
{
WCHAR
*
buffer
;
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
p
,
-
1
,
NULL
,
0
);
buffer
=
malloc
(
len
*
sizeof
(
WCHAR
)
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
p
,
-
1
,
buffer
,
len
);
return
buffer
;
}
...
...
@@ -191,7 +191,7 @@ static void test_RtlInitUnicodeStringEx(void)
UNICODE_STRING
uni
;
NTSTATUS
result
;
teststring2
=
malloc
(
(
TESTSTRING2_LEN
+
1
)
*
sizeof
(
WCHAR
));
teststring2
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
TESTSTRING2_LEN
+
1
)
*
sizeof
(
WCHAR
));
memset
(
teststring2
,
'X'
,
TESTSTRING2_LEN
*
sizeof
(
WCHAR
));
teststring2
[
TESTSTRING2_LEN
]
=
'\0'
;
...
...
@@ -293,7 +293,7 @@ static void test_RtlInitUnicodeStringEx(void)
"pRtlInitUnicodeString(&uni, 0) sets Buffer to %p, expected %p
\n
"
,
uni
.
Buffer
,
NULL
);
free
(
teststring2
);
HeapFree
(
GetProcessHeap
(),
0
,
teststring2
);
}
...
...
@@ -1364,7 +1364,7 @@ static void test_RtlUnicodeStringToInteger(void)
ok
(
value
==
0xdeadbeef
||
value
==
0
/* vista */
,
"(test %d): RtlUnicodeStringToInteger(
\"
%s
\"
, %d, [out]) assigns value %d, expected 0 or deadbeef
\n
"
,
test_num
,
str2int
[
test_num
].
str
,
str2int
[
test_num
].
base
,
value
);
free
(
wstr
);
HeapFree
(
GetProcessHeap
(),
0
,
wstr
);
}
wstr
=
AtoW
(
str2int
[
1
].
str
);
...
...
@@ -1404,7 +1404,7 @@ static void test_RtlUnicodeStringToInteger(void)
"didn't return expected value (test c): expected: %d, got: %d
\n
"
,
1
,
value
);
/* w2k: uni.Length = 0 returns value 11234567 instead of 0 */
free
(
wstr
);
HeapFree
(
GetProcessHeap
(),
0
,
wstr
);
}
...
...
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