From 8c0fd40356e4a7724b556e17b15b0d14f7d25b4d Mon Sep 17 00:00:00 2001 From: iphydf Date: Tue, 5 May 2020 22:56:03 +0100 Subject: refactor: Remove multi-declarators entirely. We no longer allow `int a, b;`. In the few cases where we used it, we instead better * limit the scope of the identifier (e.g. in a for-init-decl) * split the line and have 2 separate declarators, because the identifiers designate different types of things (e.g. friend numbers and group numbers). --- toxcore/onion_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toxcore/onion_client.c') diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 7494ea94..c1b2dcf7 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c @@ -611,7 +611,8 @@ typedef struct Onion_Client_Cmp_data { static int onion_client_cmp_entry(const void *a, const void *b) { - Onion_Client_Cmp_data cmp1, cmp2; + Onion_Client_Cmp_data cmp1; + Onion_Client_Cmp_data cmp2; memcpy(&cmp1, a, sizeof(Onion_Client_Cmp_data)); memcpy(&cmp2, b, sizeof(Onion_Client_Cmp_data)); Onion_Node entry1 = cmp1.entry; -- cgit v1.2.3