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/net_crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toxcore/net_crypto.c') diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 3ed46a99..43cc8ab1 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c @@ -1512,7 +1512,8 @@ static int handle_data_packet_core(Net_Crypto *c, int crypt_connection_id, const return -1; } - uint32_t buffer_start, num; + uint32_t buffer_start; + uint32_t num; memcpy(&buffer_start, data, sizeof(uint32_t)); memcpy(&num, data + sizeof(uint32_t), sizeof(uint32_t)); buffer_start = net_ntohl(buffer_start); -- cgit v1.2.3