diff options
author | yangfl <yangfl@users.noreply.github.com> | 2018-09-19 11:15:50 +0800 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-09-19 18:16:13 +0000 |
commit | d3d5b701cb940e5f6c7cb2af199428fc8224e665 (patch) | |
tree | 227460e1cde95443856ccbc5f0bcf082874bd41c | |
parent | 758bd9aa871666e1003691531f22f6dc515625bf (diff) |
Fix typos
-rw-r--r-- | auto_tests/TCP_test.c | 2 | ||||
-rw-r--r-- | other/docker/windows/Dockerfile | 2 | ||||
-rw-r--r-- | other/docker/windows/get_packages.sh | 2 | ||||
-rw-r--r-- | testing/misc_tools.c | 2 | ||||
-rw-r--r-- | toxav/rtp.c | 4 | ||||
-rw-r--r-- | toxav/toxav.c | 2 | ||||
-rw-r--r-- | toxcore/DHT.c | 4 | ||||
-rw-r--r-- | toxcore/DHT.h | 2 | ||||
-rw-r--r-- | toxcore/crypto_core.api.h | 2 | ||||
-rw-r--r-- | toxcore/crypto_core.h | 2 | ||||
-rw-r--r-- | toxcore/crypto_core_test.cc | 4 | ||||
-rw-r--r-- | toxcore/onion.c | 2 | ||||
-rw-r--r-- | toxcore/onion.h | 2 |
13 files changed, 16 insertions, 16 deletions
diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c index fe699947..9206e265 100644 --- a/auto_tests/TCP_test.c +++ b/auto_tests/TCP_test.c | |||
@@ -691,7 +691,7 @@ START_TEST(test_tcp_connection) | |||
691 | "Could not add tcp relay to connection\n"); | 691 | "Could not add tcp relay to connection\n"); |
692 | 692 | ||
693 | ck_assert_msg(new_tcp_connection_to(tc_2, tcp_connections_public_key(tc_1), 123) == -1, | 693 | ck_assert_msg(new_tcp_connection_to(tc_2, tcp_connections_public_key(tc_1), 123) == -1, |
694 | "Managed to readd same connection\n"); | 694 | "Managed to read same connection\n"); |
695 | 695 | ||
696 | do_TCP_server_delay(tcp_s, mono_time, 50); | 696 | do_TCP_server_delay(tcp_s, mono_time, 50); |
697 | 697 | ||
diff --git a/other/docker/windows/Dockerfile b/other/docker/windows/Dockerfile index 07903239..94bedc47 100644 --- a/other/docker/windows/Dockerfile +++ b/other/docker/windows/Dockerfile | |||
@@ -1,6 +1,6 @@ | |||
1 | FROM debian:stretch-slim | 1 | FROM debian:stretch-slim |
2 | 2 | ||
3 | # Build-time enviroment variables | 3 | # Build-time environment variables |
4 | ARG VERSION_SODIUM=1.0.16 | 4 | ARG VERSION_SODIUM=1.0.16 |
5 | ARG VERSION_OPUS=v1.2.1 | 5 | ARG VERSION_OPUS=v1.2.1 |
6 | ARG VERSION_VPX=v1.6.1 | 6 | ARG VERSION_VPX=v1.6.1 |
diff --git a/other/docker/windows/get_packages.sh b/other/docker/windows/get_packages.sh index 45c91854..397779ce 100644 --- a/other/docker/windows/get_packages.sh +++ b/other/docker/windows/get_packages.sh | |||
@@ -33,7 +33,7 @@ if [ "${SUPPORT_ARCH_x86_64}" = "true" ]; then | |||
33 | gcc-mingw-w64-x86-64 | 33 | gcc-mingw-w64-x86-64 |
34 | fi | 34 | fi |
35 | 35 | ||
36 | # Pacakges needed for running toxcore tests | 36 | # Packages needed for running toxcore tests |
37 | if [ "${SUPPORT_TEST}" = "true" ]; then | 37 | if [ "${SUPPORT_TEST}" = "true" ]; then |
38 | apt-get install -y \ | 38 | apt-get install -y \ |
39 | apt-transport-https \ | 39 | apt-transport-https \ |
diff --git a/testing/misc_tools.c b/testing/misc_tools.c index 16fb2e22..360d7a35 100644 --- a/testing/misc_tools.c +++ b/testing/misc_tools.c | |||
@@ -67,7 +67,7 @@ void c_sleep(uint32_t x) | |||
67 | // You are responsible for freeing the return value! | 67 | // You are responsible for freeing the return value! |
68 | uint8_t *hex_string_to_bin(const char *hex_string) | 68 | uint8_t *hex_string_to_bin(const char *hex_string) |
69 | { | 69 | { |
70 | // byte is represented by exactly 2 hex digits, so lenth of binary string | 70 | // byte is represented by exactly 2 hex digits, so length of binary string |
71 | // is half of that of the hex one. only hex string with even length | 71 | // is half of that of the hex one. only hex string with even length |
72 | // valid. the more proper implementation would be to check if strlen(hex_string) | 72 | // valid. the more proper implementation would be to check if strlen(hex_string) |
73 | // is odd and return error code if it is. we assume strlen is even. if it's not | 73 | // is odd and return error code if it is. we assume strlen is even. if it's not |
diff --git a/toxav/rtp.c b/toxav/rtp.c index 77cae626..36ee9688 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c | |||
@@ -71,12 +71,12 @@ static struct RTPMessage *new_message(const struct RTPHeader *header, size_t all | |||
71 | /** | 71 | /** |
72 | * Find the next free slot in work_buffer for the incoming data packet. | 72 | * Find the next free slot in work_buffer for the incoming data packet. |
73 | * | 73 | * |
74 | * - If the data packet belongs to a frame thats already in the work_buffer then | 74 | * - If the data packet belongs to a frame that's already in the work_buffer then |
75 | * use that slot. | 75 | * use that slot. |
76 | * - If there is no free slot return GET_SLOT_RESULT_DROP_OLDEST_SLOT. | 76 | * - If there is no free slot return GET_SLOT_RESULT_DROP_OLDEST_SLOT. |
77 | * - If the data packet is too old return GET_SLOT_RESULT_DROP_INCOMING. | 77 | * - If the data packet is too old return GET_SLOT_RESULT_DROP_INCOMING. |
78 | * | 78 | * |
79 | * If there is a keyframe beeing assembled in slot 0, keep it a bit longer and | 79 | * If there is a keyframe being assembled in slot 0, keep it a bit longer and |
80 | * do not kick it out right away if all slots are full instead kick out the new | 80 | * do not kick it out right away if all slots are full instead kick out the new |
81 | * incoming interframe. | 81 | * incoming interframe. |
82 | */ | 82 | */ |
diff --git a/toxav/toxav.c b/toxav/toxav.c index 85d0d9c1..c8d8a274 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -289,7 +289,7 @@ void toxav_iterate(ToxAV *av) | |||
289 | av->dmsst += current_time_monotonic(av->m->mono_time) - start; | 289 | av->dmsst += current_time_monotonic(av->m->mono_time) - start; |
290 | 290 | ||
291 | if (++av->dmssc == 3) { | 291 | if (++av->dmssc == 3) { |
292 | av->dmssa = av->dmsst / 3 + 5 /* NOTE Magic Offset for precission */; | 292 | av->dmssa = av->dmsst / 3 + 5 /* NOTE Magic Offset for precision */; |
293 | av->dmssc = 0; | 293 | av->dmssc = 0; |
294 | av->dmsst = 0; | 294 | av->dmsst = 0; |
295 | } | 295 | } |
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index a1025300..1eebb0c7 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -76,7 +76,7 @@ struct DHT_Friend { | |||
76 | /* number of times get_node packets were sent. */ | 76 | /* number of times get_node packets were sent. */ |
77 | uint32_t bootstrap_times; | 77 | uint32_t bootstrap_times; |
78 | 78 | ||
79 | /* Symetric NAT hole punching stuff. */ | 79 | /* Symmetric NAT hole punching stuff. */ |
80 | NAT nat; | 80 | NAT nat; |
81 | 81 | ||
82 | uint16_t lock_count; | 82 | uint16_t lock_count; |
@@ -238,7 +238,7 @@ static unsigned int bit_by_bit_cmp(const uint8_t *pk1, const uint8_t *pk2) | |||
238 | return i * 8 + j; | 238 | return i * 8 + j; |
239 | } | 239 | } |
240 | 240 | ||
241 | /* Shared key generations are costly, it is therefor smart to store commonly used | 241 | /* Shared key generations are costly, it is therefore smart to store commonly used |
242 | * ones so that they can re used later without being computed again. | 242 | * ones so that they can re used later without being computed again. |
243 | * | 243 | * |
244 | * If shared key is already in shared_keys, copy it to shared_key. | 244 | * If shared key is already in shared_keys, copy it to shared_key. |
diff --git a/toxcore/DHT.h b/toxcore/DHT.h index cbe905ce..5feb74d2 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h | |||
@@ -235,7 +235,7 @@ const uint8_t *dht_get_friend_public_key(const DHT *dht, uint32_t friend_num); | |||
235 | 235 | ||
236 | /*----------------------------------------------------------------------------------*/ | 236 | /*----------------------------------------------------------------------------------*/ |
237 | 237 | ||
238 | /* Shared key generations are costly, it is therefor smart to store commonly used | 238 | /* Shared key generations are costly, it is therefore smart to store commonly used |
239 | * ones so that they can re used later without being computed again. | 239 | * ones so that they can re used later without being computed again. |
240 | * | 240 | * |
241 | * If shared key is already in shared_keys, copy it to shared_key. | 241 | * If shared key is already in shared_keys, copy it to shared_key. |
diff --git a/toxcore/crypto_core.api.h b/toxcore/crypto_core.api.h index 94ccac47..b6b49624 100644 --- a/toxcore/crypto_core.api.h +++ b/toxcore/crypto_core.api.h | |||
@@ -207,7 +207,7 @@ static int32_t decrypt_data( | |||
207 | /** | 207 | /** |
208 | * Fast encrypt/decrypt operations. Use if this is not a one-time communication. | 208 | * Fast encrypt/decrypt operations. Use if this is not a one-time communication. |
209 | * $encrypt_precompute does the shared-key generation once so it does not have | 209 | * $encrypt_precompute does the shared-key generation once so it does not have |
210 | * to be preformed on every encrypt/decrypt. | 210 | * to be performed on every encrypt/decrypt. |
211 | */ | 211 | */ |
212 | static int32_t encrypt_precompute( | 212 | static int32_t encrypt_precompute( |
213 | const uint8_t[CRYPTO_PUBLIC_KEY_SIZE] public_key, | 213 | const uint8_t[CRYPTO_PUBLIC_KEY_SIZE] public_key, |
diff --git a/toxcore/crypto_core.h b/toxcore/crypto_core.h index b287b21e..c2f0296e 100644 --- a/toxcore/crypto_core.h +++ b/toxcore/crypto_core.h | |||
@@ -202,7 +202,7 @@ int32_t decrypt_data(const uint8_t *public_key, const uint8_t *secret_key, const | |||
202 | /** | 202 | /** |
203 | * Fast encrypt/decrypt operations. Use if this is not a one-time communication. | 203 | * Fast encrypt/decrypt operations. Use if this is not a one-time communication. |
204 | * encrypt_precompute does the shared-key generation once so it does not have | 204 | * encrypt_precompute does the shared-key generation once so it does not have |
205 | * to be preformed on every encrypt/decrypt. | 205 | * to be performed on every encrypt/decrypt. |
206 | */ | 206 | */ |
207 | int32_t encrypt_precompute(const uint8_t *public_key, const uint8_t *secret_key, uint8_t *shared_key); | 207 | int32_t encrypt_precompute(const uint8_t *public_key, const uint8_t *secret_key, uint8_t *shared_key); |
208 | 208 | ||
diff --git a/toxcore/crypto_core_test.cc b/toxcore/crypto_core_test.cc index d6888b19..ee3cb366 100644 --- a/toxcore/crypto_core_test.cc +++ b/toxcore/crypto_core_test.cc | |||
@@ -87,8 +87,8 @@ TEST(CryptoCore, MemcmpTimingIsDataIndependent) { | |||
87 | 87 | ||
88 | EXPECT_LT(delta, CRYPTO_TEST_MEMCMP_EPS) | 88 | EXPECT_LT(delta, CRYPTO_TEST_MEMCMP_EPS) |
89 | << "Delta time is too long (" << delta << " >= " << CRYPTO_TEST_MEMCMP_EPS << ")\n" | 89 | << "Delta time is too long (" << delta << " >= " << CRYPTO_TEST_MEMCMP_EPS << ")\n" |
90 | << "Time of the same data comparation: " << same_median << " clocks\n" | 90 | << "Time of the same data comparison: " << same_median << " clocks\n" |
91 | << "Time of the different data comparation: " << not_same_median << " clocks"; | 91 | << "Time of the different data comparison: " << not_same_median << " clocks"; |
92 | } | 92 | } |
93 | 93 | ||
94 | } // namespace | 94 | } // namespace |
diff --git a/toxcore/onion.c b/toxcore/onion.c index eceeb9f8..f1873992 100644 --- a/toxcore/onion.c +++ b/toxcore/onion.c | |||
@@ -114,7 +114,7 @@ static int ipport_unpack(IP_Port *target, const uint8_t *data, unsigned int data | |||
114 | * | 114 | * |
115 | * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) | 115 | * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) |
116 | * | 116 | * |
117 | * new_path must be an empty memory location of atleast Onion_Path size. | 117 | * new_path must be an empty memory location of at least Onion_Path size. |
118 | * | 118 | * |
119 | * return -1 on failure. | 119 | * return -1 on failure. |
120 | * return 0 on success. | 120 | * return 0 on success. |
diff --git a/toxcore/onion.h b/toxcore/onion.h index 26cf0039..20cd1e5c 100644 --- a/toxcore/onion.h +++ b/toxcore/onion.h | |||
@@ -85,7 +85,7 @@ typedef struct Onion_Path { | |||
85 | * | 85 | * |
86 | * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) | 86 | * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) |
87 | * | 87 | * |
88 | * new_path must be an empty memory location of atleast Onion_Path size. | 88 | * new_path must be an empty memory location of at least Onion_Path size. |
89 | * | 89 | * |
90 | * return -1 on failure. | 90 | * return -1 on failure. |
91 | * return 0 on success. | 91 | * return 0 on success. |