diff options
author | kyle condon <kyle@kyconny.com> | 2014-07-06 09:55:46 +0100 |
---|---|---|
committer | kyle condon <kyle@kyconny.com> | 2014-07-06 09:55:46 +0100 |
commit | a13bc5e70c097c1c0a02b25c86a603d9b400f3ec (patch) | |
tree | 4ea09598608e97f6fb53508aa9f3d610faba1ae3 /toxcore/ping_array.c | |
parent | 04b1b2cfd4f6c3d4ad6034f555236a27d0e5614c (diff) |
Update ping_array.c
Change calloc call on line 138 from empty_array->entries = calloc(size * sizeof(Ping_Array_Entry), 1);, to empty_array->entries = calloc(size, sizeof(Ping_Array_Entry));
Diffstat (limited to 'toxcore/ping_array.c')
-rw-r--r-- | toxcore/ping_array.c | 2 |
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; |