summaryrefslogtreecommitdiff
path: root/toxcore/ping_array.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/ping_array.c')
-rw-r--r--toxcore/ping_array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/ping_array.c b/toxcore/ping_array.c
index 5c92527e..93dade05 100644
--- a/toxcore/ping_array.c
+++ b/toxcore/ping_array.c
@@ -135,7 +135,7 @@ int ping_array_init(Ping_Array *empty_array, uint32_t size, uint32_t timeout)
135 if (size == 0 || timeout == 0 || empty_array == NULL) 135 if (size == 0 || timeout == 0 || empty_array == NULL)
136 return -1; 136 return -1;
137 137
138 empty_array->entries = calloc(size * sizeof(Ping_Array_Entry), 1); 138 empty_array->entries = calloc(size, sizeof(Ping_Array_Entry));
139 139
140 if (empty_array->entries == NULL) 140 if (empty_array->entries == NULL)
141 return -1; 141 return -1;