diff options
author | dartraiden <wowemuh@gmail.com> | 2022-02-07 00:34:21 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2022-02-07 00:35:37 +0300 |
commit | 223306302f39455970b67a97ba62e4a542224f7a (patch) | |
tree | 21da0622af231bea688b413d1238d15315d658ce /protocols/Tox/libtox/src/toxcore/ping_array.c | |
parent | 41317031f257ad6a06fa743860aff212074dc416 (diff) |
Update libtox to 0.2.15
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/ping_array.c')
-rw-r--r-- | protocols/Tox/libtox/src/toxcore/ping_array.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/ping_array.c b/protocols/Tox/libtox/src/toxcore/ping_array.c index 201b507d4c..fe067d2b29 100644 --- a/protocols/Tox/libtox/src/toxcore/ping_array.c +++ b/protocols/Tox/libtox/src/toxcore/ping_array.c @@ -3,13 +3,9 @@ * Copyright © 2014 Tox project. */ -/* +/** * Implementation of an efficient array to store that we pinged something. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "ping_array.h" #include <stdlib.h> @@ -20,7 +16,7 @@ #include "util.h" typedef struct Ping_Array_Entry { - void *data; + uint8_t *data; uint32_t length; uint64_t time; uint64_t ping_id; @@ -89,7 +85,7 @@ void ping_array_kill(Ping_Array *array) free(array); } -/* Clear timed out entries. +/** Clear timed out entries. */ static void ping_array_clear_timedout(Ping_Array *array, const Mono_Time *mono_time) { @@ -116,7 +112,7 @@ uint64_t ping_array_add(Ping_Array *array, const Mono_Time *mono_time, const uin clear_entry(array, index); } - array->entries[index].data = malloc(length); + array->entries[index].data = (uint8_t *)malloc(length); if (array->entries[index].data == nullptr) { return 0; |