diff options
author | iphydf <iphydf@users.noreply.github.com> | 2020-05-05 22:56:03 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2020-05-05 23:22:29 +0100 |
commit | 8c0fd40356e4a7724b556e17b15b0d14f7d25b4d (patch) | |
tree | 489599830b083d5705c0b5d2c8fb31a43242f90c /toxcore/onion_client.c | |
parent | fd2bb77923b68ec50e4812c9663eab42314d4557 (diff) |
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).
Diffstat (limited to 'toxcore/onion_client.c')
-rw-r--r-- | toxcore/onion_client.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 { | |||
611 | 611 | ||
612 | static int onion_client_cmp_entry(const void *a, const void *b) | 612 | static int onion_client_cmp_entry(const void *a, const void *b) |
613 | { | 613 | { |
614 | Onion_Client_Cmp_data cmp1, cmp2; | 614 | Onion_Client_Cmp_data cmp1; |
615 | Onion_Client_Cmp_data cmp2; | ||
615 | memcpy(&cmp1, a, sizeof(Onion_Client_Cmp_data)); | 616 | memcpy(&cmp1, a, sizeof(Onion_Client_Cmp_data)); |
616 | memcpy(&cmp2, b, sizeof(Onion_Client_Cmp_data)); | 617 | memcpy(&cmp2, b, sizeof(Onion_Client_Cmp_data)); |
617 | Onion_Node entry1 = cmp1.entry; | 618 | Onion_Node entry1 = cmp1.entry; |