summaryrefslogtreecommitdiff
path: root/toxcore/DHT.c
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2017-02-19 21:24:30 -0500
committerMaxim Biro <nurupo.contributions@gmail.com>2017-02-21 15:54:53 -0500
commitb2d04eae9d9b76523b877a9e5efd5989f83b143d (patch)
treeb82e3aa532cb145739005d6cf87f683d1f9ae5c2 /toxcore/DHT.c
parent1cc119c7a391f8ff5410a792ee6eb32b11d01151 (diff)
Use VLA macro
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r--toxcore/DHT.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index dfd4d821..7064d3d5 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -867,7 +867,7 @@ static void sort_client_list(Client_data *list, unsigned int length, const uint8
867{ 867{
868 // Pass comp_public_key to qsort with each Client_data entry, so the 868 // Pass comp_public_key to qsort with each Client_data entry, so the
869 // comparison function can use it as the base of comparison. 869 // comparison function can use it as the base of comparison.
870 Cmp_data cmp_list[length]; 870 VLA(Cmp_data, cmp_list, length);
871 871
872 for (uint32_t i = 0; i < length; i++) { 872 for (uint32_t i = 0; i < length; i++) {
873 cmp_list[i].base_public_key = comp_public_key; 873 cmp_list[i].base_public_key = comp_public_key;