summaryrefslogtreecommitdiff
path: root/toxcore/onion_announce.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2020-05-05 22:56:03 +0100
committeriphydf <iphydf@users.noreply.github.com>2020-05-05 23:22:29 +0100
commit8c0fd40356e4a7724b556e17b15b0d14f7d25b4d (patch)
tree489599830b083d5705c0b5d2c8fb31a43242f90c /toxcore/onion_announce.c
parentfd2bb77923b68ec50e4812c9663eab42314d4557 (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_announce.c')
-rw-r--r--toxcore/onion_announce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toxcore/onion_announce.c b/toxcore/onion_announce.c
index 6d38012a..0a04a4b8 100644
--- a/toxcore/onion_announce.c
+++ b/toxcore/onion_announce.c
@@ -259,7 +259,8 @@ typedef struct Cmp_data {
259 259
260static int cmp_entry(const void *a, const void *b) 260static int cmp_entry(const void *a, const void *b)
261{ 261{
262 Cmp_data cmp1, cmp2; 262 Cmp_data cmp1;
263 Cmp_data cmp2;
263 memcpy(&cmp1, a, sizeof(Cmp_data)); 264 memcpy(&cmp1, a, sizeof(Cmp_data));
264 memcpy(&cmp2, b, sizeof(Cmp_data)); 265 memcpy(&cmp2, b, sizeof(Cmp_data));
265 Onion_Announce_Entry entry1 = cmp1.entry; 266 Onion_Announce_Entry entry1 = cmp1.entry;