]> git.meshlink.io Git - meshlink/commitdiff
Fix spelling errors.
authorGuus Sliepen <guus@meshlink.io>
Mon, 3 Feb 2020 15:24:41 +0000 (16:24 +0100)
committerGuus Sliepen <guus@meshlink.io>
Mon, 3 Feb 2020 15:24:41 +0000 (16:24 +0100)
Found by codespell.

examples/groupchat.c
src/discovery.c
src/ed25519/add_scalar.c
src/ed25519/sha512.c
src/meshlink.c
src/meshlink.h
src/packmsg.h
test/blackbox/run_blackbox_tests/execute_tests.h
test/blackbox/run_blackbox_tests/test_cases_random_port_bindings01.c
test/blackbox/run_blackbox_tests/test_cases_submesh02.c

index c049dd8a49b79ab868dbe39e1cd43d6072b3ae93..75e259db7d1d8ed16caee6e7cac92abe9b0043f4 100644 (file)
@@ -129,7 +129,7 @@ static void parse_command(meshlink_handle_t *mesh, char *buf) {
                        }
 
                        if(!s) {
                        }
 
                        if(!s) {
-                               fprintf(stderr, "Group is not yet creted!\n");
+                               fprintf(stderr, "Group is not yet created!\n");
                                return;
                        }
                }
                                return;
                        }
                }
index 68e1a2610db6cac4cdaaafc975ac02465ffdd3ec..da4a1d7de4e010b0b5872327056f2ba4047cb1c7 100644 (file)
@@ -397,7 +397,7 @@ static void *discovery_loop(void *userdata) {
        /* Free the configuration data */
        catta_server_config_free(&config);
 
        /* 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;
        if(!mesh->catta_server) {
                logger(mesh, MESHLINK_ERROR, "Failed to create discovery server: %s\n", catta_strerror(error));
                goto fail;
index 262ec725119035986fba7ee6b409c1d8c7cb0ed8..37fed7b08e493ea95835395d38f7e1675588cdd4 100644 (file)
@@ -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 */
     /* 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
            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 {
         if (private_key) {
             ge_scalarmult_base(&A, private_key);
         } else {
index 73c4bc13197f4ef86f6d8bc22c0682f6aae7d593..45cbf9c99c28359a9a598597bac858016c1b2fee 100644 (file)
@@ -248,7 +248,7 @@ int sha512_final(sha512_context *md, void *vout)
                md->curlen = 0;
        }
 
                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... :-)
         */
         * 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... :-)
         */
index 0bec2f8aaf831c2cfd663f36fb7c0f97a7155633..11e45503c4ccbebc9a9098c89a3ae7d52c27008f 100644 (file)
@@ -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:
                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;
                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)) {
        // 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;
                }
                        pthread_mutex_unlock(&mesh->mutex);
                        return NULL;
                }
index e0f1bae7b09d6413d9b809ef514cbe5f75143348..8a3c1a19ab78fef1ee763faa522d48b8e9aa94a7 100644 (file)
@@ -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.
  *
  *  @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__));
 
  */
 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.
  *
  *  @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__));
 
  */
 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.
 
 /// 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);
 
  */
 typedef void (*meshlink_error_cb_t)(struct meshlink_handle *mesh, meshlink_errno_t meshlink_errno);
 
index a145722df79b646e2bc2442cca42f989483f0e8f..69632f518578d3e67c63ede9617c373150fbf6ac 100644 (file)
@@ -129,7 +129,7 @@ typedef struct packmsg_input {
  *  \memberof packmsg_output
  *
  * This function checks if all operations performed on the output buffer so far
  *  \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.
  *
  *
  * \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
  *  \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.
  *
  *
  * \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
  *
 /** \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.
  */
  *
  * \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.
  *
  * 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.
  * 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
  *
  * 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.
  * 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.
index bdf28ea52bc93f56eff9093cda92a5fd580df5f1..cafc83f0fdd7ccc6d20270c935a4391313da5c69 100644 (file)
@@ -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.
 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.
  *
  *  @param status           Pointer to array of status handles of target nodes.
  *  @param length               Number of nodes to check.
index 5cce98c0b4e805b296b8b70132b331efe64d9081..23118c94c5ad981cc523fff102081cce42e85d16 100644 (file)
@@ -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
     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.
 
     Expected Result:
     The meshlink_set_port() API should fail.
index e80ed26f06c84502b56403df78057cd2240a1bfe..9f21850acd5a53d156a3addc363617fc2e6e71d4 100644 (file)
@@ -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
     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.
        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.