mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed memory allocation type inconsistency
This commit is contained in:
parent
acc25436f8
commit
d9f5e01bd7
|
@ -777,11 +777,11 @@ void *handle_timeout ( void *arg )
|
||||||
void add_peer( MSICall *call, int peer_id )
|
void add_peer( MSICall *call, int peer_id )
|
||||||
{
|
{
|
||||||
if ( !call->peers ) {
|
if ( !call->peers ) {
|
||||||
call->peers = calloc(sizeof(int), 1);
|
call->peers = calloc(sizeof(uint32_t), 1);
|
||||||
call->peer_count = 1;
|
call->peer_count = 1;
|
||||||
} else {
|
} else {
|
||||||
call->peer_count ++;
|
call->peer_count ++;
|
||||||
call->peers = realloc( call->peers, sizeof(int) * call->peer_count);
|
call->peers = realloc( call->peers, sizeof(uint32_t) * call->peer_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
call->peers[call->peer_count - 1] = peer_id;
|
call->peers[call->peer_count - 1] = peer_id;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user