diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-09-12 21:37:58 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-13 01:07:02 +0100 |
commit | a8823830d39bdbde8d4f4f34bfcb26dc4bf79741 (patch) | |
tree | 086d51b0db42c8fdbef669d002739f607db52f01 /toxcore/ping.c | |
parent | 0aa2840164fc782f150cd45f8668ca623e6002cf (diff) |
Add some astyle options to make it do more.
It now enforces a bit more formatting. In particular, padding inside
parentheses is removed. I would like it to remove padding after unary
operators, but there seems to be no option for that.
Diffstat (limited to 'toxcore/ping.c')
-rw-r--r-- | toxcore/ping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/ping.c b/toxcore/ping.c index d2a01f5d..d15ccd47 100644 --- a/toxcore/ping.c +++ b/toxcore/ping.c | |||
@@ -125,7 +125,7 @@ static int send_ping_response(PING *ping, IP_Port ipp, const uint8_t *public_key | |||
125 | rc = encrypt_data_symmetric(shared_encryption_key, | 125 | rc = encrypt_data_symmetric(shared_encryption_key, |
126 | pk + 1 + crypto_box_PUBLICKEYBYTES, | 126 | pk + 1 + crypto_box_PUBLICKEYBYTES, |
127 | ping_plain, sizeof(ping_plain), | 127 | ping_plain, sizeof(ping_plain), |
128 | pk + 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES ); | 128 | pk + 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES); |
129 | 129 | ||
130 | if (rc != PING_PLAIN_SIZE + crypto_box_MACBYTES) { | 130 | if (rc != PING_PLAIN_SIZE + crypto_box_MACBYTES) { |
131 | return 1; | 131 | return 1; |
@@ -158,7 +158,7 @@ static int handle_ping_request(void *_dht, IP_Port source, const uint8_t *packet | |||
158 | packet + 1 + crypto_box_PUBLICKEYBYTES, | 158 | packet + 1 + crypto_box_PUBLICKEYBYTES, |
159 | packet + 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES, | 159 | packet + 1 + crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES, |
160 | PING_PLAIN_SIZE + crypto_box_MACBYTES, | 160 | PING_PLAIN_SIZE + crypto_box_MACBYTES, |
161 | ping_plain ); | 161 | ping_plain); |
162 | 162 | ||
163 | if (rc != sizeof(ping_plain)) { | 163 | if (rc != sizeof(ping_plain)) { |
164 | return 1; | 164 | return 1; |