From d3d5b701cb940e5f6c7cb2af199428fc8224e665 Mon Sep 17 00:00:00 2001 From: yangfl Date: Wed, 19 Sep 2018 11:15:50 +0800 Subject: Fix typos --- auto_tests/TCP_test.c | 2 +- other/docker/windows/Dockerfile | 2 +- other/docker/windows/get_packages.sh | 2 +- testing/misc_tools.c | 2 +- toxav/rtp.c | 4 ++-- toxav/toxav.c | 2 +- toxcore/DHT.c | 4 ++-- toxcore/DHT.h | 2 +- toxcore/crypto_core.api.h | 2 +- toxcore/crypto_core.h | 2 +- toxcore/crypto_core_test.cc | 4 ++-- toxcore/onion.c | 2 +- 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) "Could not add tcp relay to connection\n"); ck_assert_msg(new_tcp_connection_to(tc_2, tcp_connections_public_key(tc_1), 123) == -1, - "Managed to readd same connection\n"); + "Managed to read same connection\n"); do_TCP_server_delay(tcp_s, mono_time, 50); 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 @@ FROM debian:stretch-slim -# Build-time enviroment variables +# Build-time environment variables ARG VERSION_SODIUM=1.0.16 ARG VERSION_OPUS=v1.2.1 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 gcc-mingw-w64-x86-64 fi -# Pacakges needed for running toxcore tests +# Packages needed for running toxcore tests if [ "${SUPPORT_TEST}" = "true" ]; then apt-get install -y \ 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) // You are responsible for freeing the return value! uint8_t *hex_string_to_bin(const char *hex_string) { - // byte is represented by exactly 2 hex digits, so lenth of binary string + // byte is represented by exactly 2 hex digits, so length of binary string // is half of that of the hex one. only hex string with even length // valid. the more proper implementation would be to check if strlen(hex_string) // 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 /** * Find the next free slot in work_buffer for the incoming data packet. * - * - If the data packet belongs to a frame thats already in the work_buffer then + * - If the data packet belongs to a frame that's already in the work_buffer then * use that slot. * - If there is no free slot return GET_SLOT_RESULT_DROP_OLDEST_SLOT. * - If the data packet is too old return GET_SLOT_RESULT_DROP_INCOMING. * - * If there is a keyframe beeing assembled in slot 0, keep it a bit longer and + * If there is a keyframe being assembled in slot 0, keep it a bit longer and * do not kick it out right away if all slots are full instead kick out the new * incoming interframe. */ 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) av->dmsst += current_time_monotonic(av->m->mono_time) - start; if (++av->dmssc == 3) { - av->dmssa = av->dmsst / 3 + 5 /* NOTE Magic Offset for precission */; + av->dmssa = av->dmsst / 3 + 5 /* NOTE Magic Offset for precision */; av->dmssc = 0; av->dmsst = 0; } 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 { /* number of times get_node packets were sent. */ uint32_t bootstrap_times; - /* Symetric NAT hole punching stuff. */ + /* Symmetric NAT hole punching stuff. */ NAT nat; uint16_t lock_count; @@ -238,7 +238,7 @@ static unsigned int bit_by_bit_cmp(const uint8_t *pk1, const uint8_t *pk2) return i * 8 + j; } -/* Shared key generations are costly, it is therefor smart to store commonly used +/* Shared key generations are costly, it is therefore smart to store commonly used * ones so that they can re used later without being computed again. * * 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); /*----------------------------------------------------------------------------------*/ -/* Shared key generations are costly, it is therefor smart to store commonly used +/* Shared key generations are costly, it is therefore smart to store commonly used * ones so that they can re used later without being computed again. * * 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( /** * Fast encrypt/decrypt operations. Use if this is not a one-time communication. * $encrypt_precompute does the shared-key generation once so it does not have - * to be preformed on every encrypt/decrypt. + * to be performed on every encrypt/decrypt. */ static int32_t encrypt_precompute( 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 /** * Fast encrypt/decrypt operations. Use if this is not a one-time communication. * encrypt_precompute does the shared-key generation once so it does not have - * to be preformed on every encrypt/decrypt. + * to be performed on every encrypt/decrypt. */ int32_t encrypt_precompute(const uint8_t *public_key, const uint8_t *secret_key, uint8_t *shared_key); 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) { EXPECT_LT(delta, CRYPTO_TEST_MEMCMP_EPS) << "Delta time is too long (" << delta << " >= " << CRYPTO_TEST_MEMCMP_EPS << ")\n" - << "Time of the same data comparation: " << same_median << " clocks\n" - << "Time of the different data comparation: " << not_same_median << " clocks"; + << "Time of the same data comparison: " << same_median << " clocks\n" + << "Time of the different data comparison: " << not_same_median << " clocks"; } } // 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 * * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) * - * new_path must be an empty memory location of atleast Onion_Path size. + * new_path must be an empty memory location of at least Onion_Path size. * * return -1 on failure. * 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 { * * Create a new onion path out of nodes (nodes is a list of ONION_PATH_LENGTH nodes) * - * new_path must be an empty memory location of atleast Onion_Path size. + * new_path must be an empty memory location of at least Onion_Path size. * * return -1 on failure. * return 0 on success. -- cgit v1.2.3