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
670d6391
Commit
670d6391
authored
Nov 02, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32/tests: Use CRT allocation functions.
parent
abbc88f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
drawdib.c
dlls/msvfw32/tests/drawdib.c
+4
-4
mciwnd.c
dlls/msvfw32/tests/mciwnd.c
+2
-3
No files found.
dlls/msvfw32/tests/drawdib.c
View file @
670d6391
...
...
@@ -63,7 +63,7 @@ static char *hash_dib(const BITMAPINFO *bmi, const void *bits)
CryptGetHashParam
(
hash
,
HP_HASHVAL
,
hash_buf
,
&
hash_size
,
0
);
CryptDestroyHash
(
hash
);
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
hash_size
*
2
+
1
);
buf
=
malloc
(
hash_size
*
2
+
1
);
for
(
i
=
0
;
i
<
hash_size
;
i
++
)
{
...
...
@@ -131,7 +131,7 @@ static void test_DrawDib_sizeimage(void)
init_bmi
(
&
src_info
,
WIDTH
,
HEIGHT
,
0
);
src_dib_size
=
get_dib_size
(
&
src_info
);
src_bits
=
HeapAlloc
(
GetProcessHeap
(),
0
,
src_dib_size
);
src_bits
=
malloc
(
src_dib_size
);
ok
(
src_bits
!=
NULL
,
"Can't allocate memory
\n
"
);
memset
(
src_bits
,
0x88
,
src_dib_size
);
...
...
@@ -160,13 +160,13 @@ static void test_DrawDib_sizeimage(void)
ok
(
strcmp
(
hash
,
test_data
[
i
].
hash
)
==
0
,
"[%u] got %s, expected %s
\n
"
,
i
,
hash
,
test_data
[
i
].
hash
);
HeapFree
(
GetProcessHeap
(),
0
,
hash
);
free
(
hash
);
}
r
=
DrawDibClose
(
hdd
);
ok
(
r
,
"DrawDibClose failed
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
src_bits
);
free
(
src_bits
);
DeleteDC
(
hdc
);
}
...
...
dlls/msvfw32/tests/mciwnd.c
View file @
670d6391
...
...
@@ -23,7 +23,6 @@
#include <windows.h>
#include <vfw.h>
#include "wine/heap.h"
#include "wine/test.h"
static
const
DWORD
file_header
[]
=
/* file_header */
...
...
@@ -136,7 +135,7 @@ static BOOL create_avi_file(char *fname)
if
(
hFile
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
buffer_length
=
padding
[
1
];
buffer
=
heap_alloc_zero
(
buffer_length
);
buffer
=
calloc
(
1
,
buffer_length
);
WriteFile
(
hFile
,
file_header
,
sizeof
(
file_header
),
&
written
,
NULL
);
WriteFile
(
hFile
,
&
main_avi_header
,
sizeof
(
MainAVIHeader
),
&
written
,
NULL
);
...
...
@@ -147,7 +146,7 @@ static BOOL create_avi_file(char *fname)
WriteFile
(
hFile
,
buffer
,
buffer_length
,
&
written
,
NULL
);
WriteFile
(
hFile
,
data
,
sizeof
(
data
),
&
written
,
NULL
);
heap_
free
(
buffer
);
free
(
buffer
);
CloseHandle
(
hFile
);
return
ret
;
...
...
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