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
1817d4cc
Commit
1817d4cc
authored
Nov 11, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/tests: Use calloc instead of HeapAlloc.
Fixes:
bb6bcaf8
parent
2fcbfc4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
wave.c
dlls/winmm/tests/wave.c
+2
-4
No files found.
dlls/winmm/tests/wave.c
View file @
1817d4cc
...
...
@@ -1586,8 +1586,7 @@ static void test_fragmentsize(void)
memset
(
hdr
,
0
,
sizeof
(
hdr
));
hdr
[
0
].
dwBufferLength
=
(
fmt
.
nSamplesPerSec
*
fmt
.
nBlockAlign
/
4
)
+
1
;
hdr
[
1
].
dwBufferLength
=
hdr
[
0
].
dwBufferLength
-
2
;
hdr
[
1
].
lpData
=
hdr
[
0
].
lpData
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
hdr
[
0
].
dwBufferLength
);
hdr
[
1
].
lpData
=
hdr
[
0
].
lpData
=
calloc
(
1
,
hdr
[
0
].
dwBufferLength
);
rc
=
waveOutPrepareHeader
(
wout
,
&
hdr
[
0
],
sizeof
(
hdr
[
0
]));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutPrepareHeader failed: %s
\n
"
,
wave_out_error
(
rc
));
...
...
@@ -1694,8 +1693,7 @@ static void test_reentrant_callback(void)
memset
(
hdr
,
0
,
sizeof
(
hdr
));
hdr
[
0
].
dwBufferLength
=
(
fmt
.
nSamplesPerSec
*
fmt
.
nBlockAlign
/
10
);
hdr
[
1
].
dwBufferLength
=
hdr
[
0
].
dwBufferLength
;
hdr
[
1
].
lpData
=
hdr
[
0
].
lpData
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
hdr
[
0
].
dwBufferLength
);
hdr
[
1
].
lpData
=
hdr
[
0
].
lpData
=
calloc
(
1
,
hdr
[
0
].
dwBufferLength
);
rc
=
waveOutPrepareHeader
(
wout
,
&
hdr
[
0
],
sizeof
(
hdr
[
0
]));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutPrepareHeader failed: %s
\n
"
,
wave_out_error
(
rc
));
...
...
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