From: Guus Sliepen Date: Mon, 3 Feb 2020 15:24:41 +0000 (+0100) Subject: Fix spelling errors. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=902446edf822a32383c4fa4b7c13b83a568095ad;p=meshlink Fix spelling errors. Found by codespell. --- diff --git a/examples/groupchat.c b/examples/groupchat.c index c049dd8a..75e259db 100644 --- a/examples/groupchat.c +++ b/examples/groupchat.c @@ -129,7 +129,7 @@ static void parse_command(meshlink_handle_t *mesh, char *buf) { } if(!s) { - fprintf(stderr, "Group is not yet creted!\n"); + fprintf(stderr, "Group is not yet created!\n"); return; } } diff --git a/src/discovery.c b/src/discovery.c index 68e1a261..da4a1d7d 100644 --- a/src/discovery.c +++ b/src/discovery.c @@ -397,7 +397,7 @@ static void *discovery_loop(void *userdata) { /* Free the configuration data */ catta_server_config_free(&config); - /* Check wether creating the server object succeeded */ + /* Check whether creating the server object succeeded */ if(!mesh->catta_server) { logger(mesh, MESHLINK_ERROR, "Failed to create discovery server: %s\n", catta_strerror(error)); goto fail; diff --git a/src/ed25519/add_scalar.c b/src/ed25519/add_scalar.c index 262ec725..37fed7b0 100644 --- a/src/ed25519/add_scalar.c +++ b/src/ed25519/add_scalar.c @@ -30,9 +30,9 @@ void ed25519_add_scalar(unsigned char *public_key, unsigned char *private_key, c /* public key: A = nB + T */ if (public_key) { /* if we know the private key we don't need a point addition, which is faster */ - /* using a "timing attack" you could find out wether or not we know the private + /* using a "timing attack" you could find out whether or not we know the private key, but this information seems rather useless - if this is important pass - public_key and private_key seperately in 2 function calls */ + public_key and private_key separately in 2 function calls */ if (private_key) { ge_scalarmult_base(&A, private_key); } else { diff --git a/src/ed25519/sha512.c b/src/ed25519/sha512.c index 73c4bc13..45cbf9c9 100644 --- a/src/ed25519/sha512.c +++ b/src/ed25519/sha512.c @@ -248,7 +248,7 @@ int sha512_final(sha512_context *md, void *vout) md->curlen = 0; } - /* pad upto 120 bytes of zeroes + /* pad up to 120 bytes of zeroes * note: that from 112 to 120 is the 64 MSB of the length. We assume that you won't hash * > 2^64 bits of data... :-) */ diff --git a/src/meshlink.c b/src/meshlink.c index 0bec2f8a..11e45503 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -720,7 +720,7 @@ static bool invitation_receive(void *handle, uint8_t type, const void *msg, uint return finalize_join(mesh, msg, len); case 1: - logger(mesh, MESHLINK_DEBUG, "Invitation succesfully accepted.\n"); + logger(mesh, MESHLINK_DEBUG, "Invitation successfully accepted.\n"); shutdown(mesh->sock, SHUT_RDWR); mesh->success = true; break; @@ -2454,7 +2454,7 @@ char *meshlink_invite_ex(meshlink_handle_t *mesh, meshlink_submesh_t *submesh, c // If we changed our own host config file, write it out now if(mesh->self->status.dirty) { if(!node_write_config(mesh, mesh->self)) { - logger(mesh, MESHLINK_ERROR, "Could not write our own host conifg file!\n"); + logger(mesh, MESHLINK_ERROR, "Could not write our own host config file!\n"); pthread_mutex_unlock(&mesh->mutex); return NULL; } diff --git a/src/meshlink.h b/src/meshlink.h index e0f1bae7..8a3c1a19 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -173,7 +173,7 @@ extern void meshlink_open_params_free(meshlink_open_params_t *params); * @param params A pointer to a meshlink_open_params_t which must have been created earlier with meshlink_open_params_init(). * @param netns A filedescriptor that must point to a valid network namespace, or -1 to have MeshLink use the same namespace as the calling thread. * - * @return This function will return true if the open parameters have been succesfully updated, false otherwise. + * @return This function will return true if the open parameters have been successfully updated, false otherwise. */ extern bool meshlink_open_params_set_netns(meshlink_open_params_t *params, int netns) __attribute__((__warn_unused_result__)); @@ -184,7 +184,7 @@ extern bool meshlink_open_params_set_netns(meshlink_open_params_t *params, int n * @param key A pointer to a key, or NULL in case no encryption should be used. * @param keylen The length of the given key, or 0 in case no encryption should be used. * - * @return This function will return true if the open parameters have been succesfully updated, false otherwise. + * @return This function will return true if the open parameters have been successfully updated, false otherwise. */ extern bool meshlink_open_params_set_storage_key(meshlink_open_params_t *params, const void *key, size_t keylen) __attribute__((__warn_unused_result__)); @@ -514,7 +514,7 @@ extern void meshlink_set_log_cb(struct meshlink_handle *mesh, meshlink_log_level /// A callback for receiving error conditions encountered by the MeshLink thread. /** @param mesh A handle which represents an instance of MeshLink, or NULL. - * @param errno The error code describing what kind of error occured. + * @param errno The error code describing what kind of error occurred. */ typedef void (*meshlink_error_cb_t)(struct meshlink_handle *mesh, meshlink_errno_t meshlink_errno); diff --git a/src/packmsg.h b/src/packmsg.h index a145722d..69632f51 100644 --- a/src/packmsg.h +++ b/src/packmsg.h @@ -129,7 +129,7 @@ typedef struct packmsg_input { * \memberof packmsg_output * * This function checks if all operations performed on the output buffer so far - * have all completed succesfully, and the buffer contains a valid PackMessage message. + * have all completed successfully, and the buffer contains a valid PackMessage message. * * \param buf A pointer to an output buffer iterator. * @@ -166,7 +166,7 @@ static inline size_t packmsg_output_size(const packmsg_output_t *buf, const uint * \memberof packmsg_input * * This function checks if all operations performed on the input buffer so far - * have all completed succesfully, and the buffer contains a valid PackMessage message. + * have all completed successfully, and the buffer contains a valid PackMessage message. * * \param buf A pointer to an input buffer iterator. * @@ -730,8 +730,8 @@ static inline uint8_t packmsg_peek_hdr_(const packmsg_input_t *buf) { /** \brief Get a NIL from the input. * \memberof packmsg_input * - * This function does not return anything, but will invalidate the input interator - * if no NIL was succesfully consumed from the input. + * This function does not return anything, but will invalidate the input iterator + * if no NIL was successfully consumed from the input. * * \param buf A pointer to an input buffer iterator. */ @@ -1096,7 +1096,7 @@ static inline char *packmsg_get_str_dup(packmsg_input_t *buf) { * * This function copies a string from the input another buffer provided by the application. * The buffer must be long enough to hold the complete string plus a terminating NUL-byte. - * If the buffer is not long enough, or another error occured, + * If the buffer is not long enough, or another error occurred, * a single NUL-byte will be written to the start of the buffer (if its size is at least one byte). * * \param buf A pointer to an input buffer iterator. @@ -1444,8 +1444,8 @@ static inline uint32_t packmsg_get_array(packmsg_input_t *buf) { * * This enum describes the type of an element in a PackMessage message. * In case of integers and floating point values, the type normally represents - * the smallest type that can succesfully hold the value of the element; - * i.e. an element of type PACKMSG_INT32 can only succesfully be read by + * the smallest type that can successfully hold the value of the element; + * i.e. an element of type PACKMSG_INT32 can only successfully be read by * packmsg_get_int32() or packmsg_get_int64(). However, the converse it not true; * for an element of type PACKMSG_INT32, there is no guarantee * that the value is larger than would fit into an int16_t. diff --git a/test/blackbox/run_blackbox_tests/execute_tests.h b/test/blackbox/run_blackbox_tests/execute_tests.h index bdf28ea5..cafc83f0 100644 --- a/test/blackbox/run_blackbox_tests/execute_tests.h +++ b/test/blackbox/run_blackbox_tests/execute_tests.h @@ -58,7 +58,7 @@ extern bool change_state(node_status_t *status, mesh_event_t currentEv); extern void signal_node_start(node_status_t *node_status, int start, int end, char *node_ids[]); /// Checks for the completion of nodes state machines. -/** This function checks wheather the nodes state machines have reached their maximum state indexes +/** This function checks whether the nodes state machines have reached their maximum state indexes * * @param status Pointer to array of status handles of target nodes. * @param length Number of nodes to check. diff --git a/test/blackbox/run_blackbox_tests/test_cases_random_port_bindings01.c b/test/blackbox/run_blackbox_tests/test_cases_random_port_bindings01.c index 5cce98c0..23118c94 100644 --- a/test/blackbox/run_blackbox_tests/test_cases_random_port_bindings01.c +++ b/test/blackbox/run_blackbox_tests/test_cases_random_port_bindings01.c @@ -186,7 +186,7 @@ void test_case_mesh_random_port_bindings_02(void **state) { Test Steps: 1. Open a node and start the instance. 2. Call meshlink_set_port() with port 10000 - 3. When try bind succeds block the port using devtool_trybind_probe() callback. + 3. When try bind succeeds block the port using devtool_trybind_probe() callback. Expected Result: The meshlink_set_port() API should fail. diff --git a/test/blackbox/run_blackbox_tests/test_cases_submesh02.c b/test/blackbox/run_blackbox_tests/test_cases_submesh02.c index e80ed26f..9f21850a 100644 --- a/test/blackbox/run_blackbox_tests/test_cases_submesh02.c +++ b/test/blackbox/run_blackbox_tests/test_cases_submesh02.c @@ -134,7 +134,7 @@ static void test_case_submesh_02(void **state) { 2. Generate invites to app1node1, app2node1, corenode2, app1node2 and app2node2 from corenode1 to join corenode1. 3. After Join is successful start channels from all nodes and exchange data on channels - 4. Try to fetch the list of all nodes and check if the nodes in other submesh doesnot + 4. Try to fetch the list of all nodes and check if the nodes in other submesh does not appear in the list. 5. Try fetch all the nodes with a submesh handle and check only if both the nodes joining the submesh are present.