diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2017-02-19 21:24:30 -0500 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2017-02-21 15:54:53 -0500 |
commit | b2d04eae9d9b76523b877a9e5efd5989f83b143d (patch) | |
tree | b82e3aa532cb145739005d6cf87f683d1f9ae5c2 /toxcore/onion_client.c | |
parent | 1cc119c7a391f8ff5410a792ee6eb32b11d01151 (diff) |
Use VLA macro
Diffstat (limited to 'toxcore/onion_client.c')
-rw-r--r-- | toxcore/onion_client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 58ac8e0d..ddae84e5 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -517,7 +517,7 @@ static void sort_onion_node_list(Onion_Node *list, unsigned int length, const ui | |||
517 | { | 517 | { |
518 | // Pass comp_public_key to qsort with each Client_data entry, so the | 518 | // Pass comp_public_key to qsort with each Client_data entry, so the |
519 | // comparison function can use it as the base of comparison. | 519 | // comparison function can use it as the base of comparison. |
520 | Cmp_data cmp_list[length]; | 520 | VLA(Cmp_data, cmp_list, length); |
521 | 521 | ||
522 | for (uint32_t i = 0; i < length; i++) { | 522 | for (uint32_t i = 0; i < length; i++) { |
523 | cmp_list[i].base_public_key = comp_public_key; | 523 | cmp_list[i].base_public_key = comp_public_key; |