mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
uxtheme/tests: Use CRT allocation functions.
This commit is contained in:
parent
0c3530d698
commit
da42d96aa8
Notes:
Alexandre Julliard
2023-10-30 23:32:23 +01:00
Approved-by: Zhiyi Zhang (@zhiyi) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/-/merge_requests/4221
1 changed files with 4 additions and 5 deletions
|
@ -20,7 +20,6 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <windows.h>
|
||||
#include "wine/heap.h"
|
||||
#include "wine/test.h"
|
||||
|
||||
/* undocumented SWP flags - from SDK 3.1 */
|
||||
|
@ -69,13 +68,13 @@ static void add_message(struct msg_sequence **seq, int sequence_index,
|
|||
if (!msg_seq->sequence)
|
||||
{
|
||||
msg_seq->size = 10;
|
||||
msg_seq->sequence = heap_alloc(msg_seq->size * sizeof (*msg_seq->sequence));
|
||||
msg_seq->sequence = malloc(msg_seq->size * sizeof(*msg_seq->sequence));
|
||||
}
|
||||
|
||||
if (msg_seq->count == msg_seq->size)
|
||||
{
|
||||
msg_seq->size *= 2;
|
||||
msg_seq->sequence = heap_realloc(msg_seq->sequence, msg_seq->size * sizeof (*msg_seq->sequence));
|
||||
msg_seq->sequence = realloc(msg_seq->sequence, msg_seq->size * sizeof(*msg_seq->sequence));
|
||||
}
|
||||
|
||||
assert(msg_seq->sequence);
|
||||
|
@ -87,7 +86,7 @@ static void add_message(struct msg_sequence **seq, int sequence_index,
|
|||
static inline void flush_sequence(struct msg_sequence **seg, int sequence_index)
|
||||
{
|
||||
struct msg_sequence *msg_seq = seg[sequence_index];
|
||||
heap_free(msg_seq->sequence);
|
||||
free(msg_seq->sequence);
|
||||
msg_seq->sequence = NULL;
|
||||
msg_seq->count = msg_seq->size = 0;
|
||||
}
|
||||
|
@ -405,5 +404,5 @@ static void init_msg_sequences(struct msg_sequence **seq, int n)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
seq[i] = heap_alloc_zero(sizeof(*seq[i]));
|
||||
seq[i] = calloc(1, sizeof(*seq[i]));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue