From 03a511482ffa643a636cd5bcce596f110ca2d8e0 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sat, 16 May 2020 23:04:10 +0100 Subject: Format comments according to tokstyle's requirements. --- toxav/toxav.c | 8 ++++---- toxav/video.c | 8 ++++---- toxcore/DHT.c | 6 +++--- toxcore/DHT.h | 6 +++--- toxcore/LAN_discovery.c | 2 +- toxcore/Messenger.c | 2 +- toxcore/TCP_connection.h | 2 +- toxcore/friend_connection.c | 2 +- toxcore/net_crypto.c | 8 ++++---- toxcore/net_crypto.h | 4 ++-- toxcore/onion_client.c | 4 ++-- toxcore/onion_client.h | 2 +- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/toxav/toxav.c b/toxav/toxav.c index 0ecf8259..2e2e8b07 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c @@ -30,10 +30,10 @@ #define VIDEO_SEND_X_KEYFRAMES_FIRST 7 // force the first n frames to be keyframes! /* -VPX_DL_REALTIME (1) deadline parameter analogous to VPx REALTIME mode. -VPX_DL_GOOD_QUALITY (1000000) deadline parameter analogous to VPx GOOD QUALITY mode. -VPX_DL_BEST_QUALITY (0) deadline parameter analogous to VPx BEST QUALITY mode. -*/ + * VPX_DL_REALTIME (1) deadline parameter analogous to VPx REALTIME mode. + * VPX_DL_GOOD_QUALITY (1000000) deadline parameter analogous to VPx GOOD QUALITY mode. + * VPX_DL_BEST_QUALITY (0) deadline parameter analogous to VPx BEST QUALITY mode. + */ typedef struct ToxAVCall_s { ToxAV *av; diff --git a/toxav/video.c b/toxav/video.c index 3d3714eb..56be17ab 100644 --- a/toxav/video.c +++ b/toxav/video.c @@ -237,10 +237,10 @@ VCSession *vc_new(Mono_Time *mono_time, const Logger *log, ToxAV *av, uint32_t f } /* - VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int) - control function to set noise sensitivity - 0: off, 1: OnYOnly, 2: OnYUV, 3: OnYUVAggressive, 4: Adaptive - */ + * VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int) + * control function to set noise sensitivity + * 0: off, 1: OnYOnly, 2: OnYUV, 3: OnYUVAggressive, 4: Adaptive + */ #if 0 rc = vpx_codec_control(vc->encoder, VP8E_SET_NOISE_SENSITIVITY, 2); diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 15f554e2..75a485b7 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c @@ -1294,7 +1294,7 @@ static void returnedip_ports(DHT *dht, IP_Port ip_port, const uint8_t *public_ke } /* Send a getnodes request. - sendback_node is the node that it will send back the response to (set to NULL to disable this) */ + * sendback_node is the node that it will send back the response to (set to NULL to disable this) */ static int getnodes(DHT *dht, IP_Port ip_port, const uint8_t *public_key, const uint8_t *client_id, const Node_format *sendback_node) { @@ -1427,7 +1427,7 @@ static int handle_getnodes(void *object, IP_Port source, const uint8_t *packet, } /* return false if no - return true if yes */ + * return true if yes */ static bool sent_getnode_to_node(DHT *dht, const uint8_t *public_key, IP_Port node_ip_port, uint64_t ping_id, Node_format *sendback_node) { @@ -2447,7 +2447,7 @@ static int handle_hardening(void *object, IP_Port source, const uint8_t *source_ length_nodes, 0); /* TODO(irungentoo): MAX_SENT_NODES nodes should be returned at all times - (right now we have a small network size so it could cause problems for testing and etc..) */ + * (right now we have a small network size so it could cause problems for testing and etc..) */ if (num_nodes <= 0) { return 1; } diff --git a/toxcore/DHT.h b/toxcore/DHT.h index 13f7ce20..40ce73f1 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h @@ -69,9 +69,9 @@ int create_request(const uint8_t *send_public_key, const uint8_t *send_secret_ke const uint8_t *recv_public_key, const uint8_t *data, uint32_t length, uint8_t request_id); /* puts the senders public key in the request in public_key, the data from the request - in data if a friend or ping request was sent to us and returns the length of the data. - packet is the request packet and length is its length - return -1 if not valid request. */ + * in data if a friend or ping request was sent to us and returns the length of the data. + * packet is the request packet and length is its length + * return -1 if not valid request. */ int handle_request(const uint8_t *self_public_key, const uint8_t *self_secret_key, uint8_t *public_key, uint8_t *data, uint8_t *request_id, const uint8_t *packet, uint16_t length); diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index e23550df..3f6951fc 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c @@ -331,7 +331,7 @@ bool ip_is_lan(IP ip) if (net_family_is_ipv6(ip.family)) { /* autogenerated for each interface: `FE80::*` (up to `FEBF::*`) - `FF02::1` is - according to RFC 4291 - multicast all-nodes link-local */ + * `FF02::1` is - according to RFC 4291 - multicast all-nodes link-local */ if (((ip.ip.v6.uint8[0] == 0xFF) && (ip.ip.v6.uint8[1] < 3) && (ip.ip.v6.uint8[15] == 1)) || ((ip.ip.v6.uint8[0] == 0xFE) && ((ip.ip.v6.uint8[1] & 0xC0) == 0x80))) { return true; diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 9984d7f0..9d84e7a7 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -2510,7 +2510,7 @@ static char *id_to_string(const uint8_t *pk, char *id_str, size_t length) } /* Minimum messenger run interval in ms - TODO(mannol): A/V */ + * TODO(mannol): A/V */ #define MIN_RUN_INTERVAL 50 /* Return the time in milliseconds before do_messenger() should be called again diff --git a/toxcore/TCP_connection.h b/toxcore/TCP_connection.h index 1bd5b85a..f5dd36f4 100644 --- a/toxcore/TCP_connection.h +++ b/toxcore/TCP_connection.h @@ -30,7 +30,7 @@ #define TCP_CONNECTION_ANNOUNCE_TIMEOUT (TCP_CONNECTION_TIMEOUT) /* The amount of recommended connections for each friend - NOTE: Must be at most (MAX_FRIEND_TCP_CONNECTIONS / 2) */ + * NOTE: Must be at most (MAX_FRIEND_TCP_CONNECTIONS / 2) */ #define RECOMMENDED_FRIEND_TCP_CONNECTIONS (MAX_FRIEND_TCP_CONNECTIONS / 2) /* Number of TCP connections used for onion purposes. */ diff --git a/toxcore/friend_connection.c b/toxcore/friend_connection.c index fd1fa71c..496b83b5 100644 --- a/toxcore/friend_connection.c +++ b/toxcore/friend_connection.c @@ -273,7 +273,7 @@ static unsigned int send_relays(Friend_Connections *fr_c, int friendcon_id) for (int i = 0; i < n; ++i) { /* Associated the relays being sent with this connection. - On receiving the peer will do the same which will establish the connection. */ + * On receiving the peer will do the same which will establish the connection. */ friend_add_tcp_relay(fr_c, friendcon_id, nodes[i].ip_port, nodes[i].public_key); } diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 43cc8ab1..b1473632 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c @@ -1119,7 +1119,7 @@ static int reset_max_speed_reached(Net_Crypto *c, int crypt_connection_id) } /* If last packet send failed, try to send packet again. - If sending it fails we won't be able to send the new packet. */ + * If sending it fails we won't be able to send the new packet. */ if (conn->maximum_speed_reached) { Packet_Data *dt = nullptr; const uint32_t packet_num = conn->send_array.buffer_end - 1; @@ -1157,7 +1157,7 @@ static int64_t send_lossless_packet(Net_Crypto *c, int crypt_connection_id, cons } /* If last packet send failed, try to send packet again. - If sending it fails we won't be able to send the new packet. */ + * If sending it fails we won't be able to send the new packet. */ reset_max_speed_reached(c, crypt_connection_id); if (conn->maximum_speed_reached && congestion_control) { @@ -2480,7 +2480,7 @@ static int udp_handle_packet(void *object, IP_Port source, const uint8_t *packet } /* The dT for the average packet receiving rate calculations. - Also used as the */ + * Also used as the */ #define PACKET_COUNTER_AVERAGE_INTERVAL 50 /* Ratio of recv queue size / recv packet rate (in seconds) times @@ -2566,7 +2566,7 @@ static void send_crypto_packets(Net_Crypto *c) conn->packets_resent = 0; /* conjestion control - calculate a new value of conn->packet_send_rate based on some data + * calculate a new value of conn->packet_send_rate based on some data */ unsigned int pos = conn->last_sendqueue_counter % CONGESTION_QUEUE_ARRAY_SIZE; diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index 3885a1ba..33275708 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h @@ -87,7 +87,7 @@ #define CRYPTO_SEND_PACKET_INTERVAL 1000 /* The maximum number of times we try to send the cookie request and handshake - before giving up. */ + * before giving up. */ #define MAX_NUM_SENDPACKET_TRIES 8 /* The timeout of no received UDP packets before the direct UDP connection is considered dead. */ @@ -100,7 +100,7 @@ #define CRYPTO_MAX_PADDING 8 /* Base current transfer speed on last CONGESTION_QUEUE_ARRAY_SIZE number of points taken - at the dT defined in net_crypto.c */ + * at the dT defined in net_crypto.c */ #define CONGESTION_QUEUE_ARRAY_SIZE 12 #define CONGESTION_LAST_SENT_ARRAY_SIZE (CONGESTION_QUEUE_ARRAY_SIZE * 2) diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index c1b2dcf7..bd40de13 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c @@ -21,7 +21,7 @@ #include "util.h" /* defines for the array size and - timeout for onion announce packets. */ + * timeout for onion announce packets. */ #define ANNOUNCE_ARRAY_SIZE 256 #define ANNOUNCE_TIMEOUT 10 @@ -1782,7 +1782,7 @@ static int onion_isconnected(const Onion_Client *onion_c) } /* Consider ourselves online if we are announced to half or more nodes - we are connected to */ + * we are connected to */ if (num && announced) { if ((num / 2) <= announced && (pnodes / 2) <= num) { return 1; diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h index 88e97dd6..c0f8f52c 100644 --- a/toxcore/onion_client.h +++ b/toxcore/onion_client.h @@ -26,7 +26,7 @@ #define NUMBER_ONION_PATHS 6 /* The timeout the first time the path is added and - then for all the next consecutive times */ + * then for all the next consecutive times */ #define ONION_PATH_FIRST_TIMEOUT 4 #define ONION_PATH_TIMEOUT 10 #define ONION_PATH_MAX_LIFETIME 1200 -- cgit v1.2.3