summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-26 15:12:34 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-26 15:12:34 +0200
commitb6cbb6f800ef9aeebcfb76a7ba721d4b95a2e2ca (patch)
treec493c4495db597a0382c32f67837cfac23b9ddcf /src
parent4644e3ae1def4f43a24bc76f5dacc3dd94807126 (diff)
-fix typos
Diffstat (limited to 'src')
-rw-r--r--src/gnsrecord/gnsrecord_misc.c9
-rw-r--r--src/gnsrecord/gnunet-gnsrecord-tvg.c6
-rw-r--r--src/include/gnunet_crypto_lib.h2
-rw-r--r--src/include/gnunet_gnsrecord_lib.h2
-rw-r--r--src/include/gnunet_testing_netjail_lib.h2
-rw-r--r--src/include/gnunet_testing_ng_lib.h2
-rw-r--r--src/testing/testing.c18
-rw-r--r--src/testing/testing_api_loop.c9
-rw-r--r--src/transport/gnunet-communicator-tcp.c20
-rw-r--r--src/transport/gnunet-service-tng.c7
-rw-r--r--src/util/test_crypto_cs.c6
11 files changed, 37 insertions, 46 deletions
diff --git a/src/gnsrecord/gnsrecord_misc.c b/src/gnsrecord/gnsrecord_misc.c
index 54d8fb860..5e3bbdb8c 100644
--- a/src/gnsrecord/gnsrecord_misc.c
+++ b/src/gnsrecord/gnsrecord_misc.c
@@ -44,6 +44,7 @@ GNUNET_GNSRECORD_string_normalize (const char *src)
return GNUNET_STRINGS_utf8_normalize (src);
}
+
enum GNUNET_GenericReturnValue
GNUNET_GNSRECORD_label_check (const char*label, char **emsg)
{
@@ -60,6 +61,7 @@ GNUNET_GNSRECORD_label_check (const char*label, char **emsg)
return GNUNET_OK;
}
+
/**
* Convert a zone key to a string (for printing debug messages).
* This is one of the very few calls in the entire API that is
@@ -409,6 +411,7 @@ GNUNET_GNSRECORD_record_to_identity_key (const struct GNUNET_GNSRECORD_Data *rd,
}
+
enum GNUNET_GenericReturnValue
GNUNET_GNSRECORD_normalize_record_set (const char *label,
const struct
@@ -488,7 +491,7 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
(GNUNET_YES == have_gns2dns))
{
*emsg = GNUNET_strdup (_ (
- "Redirection record set conains mutually exclusive records."));
+ "Redirection record set contains mutually exclusive records."));
return GNUNET_SYSERR;
}
/* No redirection records under empty label*/
@@ -514,7 +517,7 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
(GNUNET_YES == have_zone_delegation))
{
*emsg = GNUNET_strdup (_ (
- "Redirection record set conains mutually exclusive records."));
+ "Redirection record set contains mutually exclusive records."));
return GNUNET_SYSERR;
}
have_gns2dns = GNUNET_YES;
@@ -557,6 +560,7 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
return GNUNET_OK;
}
+
enum GNUNET_GenericReturnValue
GNUNET_GNSRECORD_convert_records_for_export (const char *label,
const struct
@@ -580,5 +584,4 @@ GNUNET_GNSRECORD_convert_records_for_export (const char *label,
}
-
/* end of gnsrecord_misc.c */
diff --git a/src/gnsrecord/gnunet-gnsrecord-tvg.c b/src/gnsrecord/gnunet-gnsrecord-tvg.c
index 7fef6f8e7..d45b3a5d8 100644
--- a/src/gnsrecord/gnunet-gnsrecord-tvg.c
+++ b/src/gnsrecord/gnunet-gnsrecord-tvg.c
@@ -104,7 +104,7 @@ print_record (const struct GNUNET_GNSRECORD_Data *rd)
printf ("\nDATA_SIZE:\n");
print_bytes (&size_nbo, sizeof (size_nbo), 8);
printf ("\nTYPE:\n");
- print_bytes(&type_nbo, sizeof (type_nbo), 8);
+ print_bytes (&type_nbo, sizeof (type_nbo), 8);
printf ("\nFLAGS: ");
print_bytes ((void*) &flags, sizeof (flags), 8);
printf ("\n");
@@ -173,7 +173,7 @@ run_pkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char *label)
printf ("Label:\n");
print_bytes (conv_lbl, strlen (conv_lbl), 8);
GNUNET_free (conv_lbl);
- printf ("\nNumber of records (integer): %d\n\n", rd_count);
+ printf ("\Number of records (integer): %d\n\n", rd_count);
for (int i = 0; i < rd_count; i++)
{
@@ -300,7 +300,7 @@ run_edkey (struct GNUNET_GNSRECORD_Data *rd, int rd_count, const char*label)
print_bytes (conv_lbl, strlen (conv_lbl), 8);
GNUNET_free (conv_lbl);
fprintf (stdout,
- "\nNumber of records (integer): %d\n\n", rd_count);
+ "\Number of records (integer): %d\n\n", rd_count);
for (int i = 0; i < rd_count; i++)
{
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 7bc7cf143..2737ee0e9 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -289,7 +289,7 @@ struct GNUNET_CRYPTO_EddsaPrivateScalar
/**
* Private ECC key material encoded for transmission. To be used only for
- * Edx25519 signatures. An inital key corresponds to data from the key
+ * Edx25519 signatures. An initial key corresponds to data from the key
* expansion and clamping in the EdDSA key generation.
*/
struct GNUNET_CRYPTO_Edx25519PrivateKey
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h
index 51dd5972d..006211aee 100644
--- a/src/include/gnunet_gnsrecord_lib.h
+++ b/src/include/gnunet_gnsrecord_lib.h
@@ -78,7 +78,7 @@ enum GNUNET_GNSRECORD_Flags
/**
* This record is critical. If it cannot be processed
- * (for example beacuse the record type is unknown)
+ * (for example because the record type is unknown)
* resolution MUST fail
*/
GNUNET_GNSRECORD_RF_CRITICAL = 1,
diff --git a/src/include/gnunet_testing_netjail_lib.h b/src/include/gnunet_testing_netjail_lib.h
index 4b5d7cfa1..b65ae6537 100644
--- a/src/include/gnunet_testing_netjail_lib.h
+++ b/src/include/gnunet_testing_netjail_lib.h
@@ -293,7 +293,7 @@ GNUNET_TESTING_free_topology (struct GNUNET_TESTING_NetjailTopology *topology);
/**
- * Calculate the unique id identifying a node from a given connction.
+ * Calculate the unique id identifying a node from a given connection.
*
* @param node_connection The connection we calculate the id from.
* @param topology The topology we get all needed information from.
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h
index 7e1ee4249..1bc66e59d 100644
--- a/src/include/gnunet_testing_ng_lib.h
+++ b/src/include/gnunet_testing_ng_lib.h
@@ -240,7 +240,7 @@ GNUNET_TESTING_interpreter_lookup_command (
/**
* Lookup command by label.
- * All commands, first into the past, then into the furture are looked up.
+ * All commands, first into the past, then into the future are looked up.
*
* @param is interpreter to lookup command in
* @param label label of the command to lookup.
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 6480d32f9..a00d7217f 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -1319,7 +1319,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
peer->nports = nports;
return peer;
- err_ret:
+err_ret:
GNUNET_free (ss_instances);
GNUNET_free (ports);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_);
@@ -2258,17 +2258,11 @@ GNUNET_TESTING_free_topology (struct GNUNET_TESTING_NetjailTopology *topology)
GNUNET_free (topology);
}
-/**
- * Calculate the unique id identifying a node from a given connction.
- *
- * @param node_connection The connection we calculate the id from.
- * @param topology The topology we get all needed information from.
- * @return The unique id of the node from the connection.
- */
+
unsigned int
-GNUNET_TESTING_calculate_num (struct
- GNUNET_TESTING_NodeConnection *node_connection,
- struct GNUNET_TESTING_NetjailTopology *topology)
+GNUNET_TESTING_calculate_num (
+ struct GNUNET_TESTING_NodeConnection *node_connection,
+ struct GNUNET_TESTING_NetjailTopology *topology)
{
unsigned int n, m, num;
@@ -2677,7 +2671,7 @@ GNUNET_TESTING_get_topo_from_file (const char *filename)
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "file lenght %lu\n",
+ "file length %lu\n",
fs);
data[fs] = '\0';
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 95d6b88e6..283284f26 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -189,14 +189,6 @@ GNUNET_TESTING_interpreter_lookup_command (
}
-/**
- * Lookup command by label.
- * All commands, first into the past, then into the furture are looked up.
- *
- * @param is interpreter to lookup command in
- * @param label label of the command to lookup.
- * @return the command, if it is found, or NULL.
- */
const struct GNUNET_TESTING_Command *
GNUNET_TESTING_interpreter_lookup_command_all (
struct GNUNET_TESTING_Interpreter *is,
@@ -351,6 +343,7 @@ GNUNET_TESTING_interpreter_get_current_command (
return &is->commands[is->ip];
}
+
const char *
GNUNET_TESTING_interpreter_get_current_label (
struct GNUNET_TESTING_Interpreter *is)
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c
index be75fa0e8..6d7a151ec 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -1340,10 +1340,11 @@ do_rekey (struct Queue *queue, const struct TCPRekey *rekey)
GNUNET_TIME_absolute_ntoh (thp.monotonic_time)));
GNUNET_assert (ntohl ((&thp)->purpose.size) == sizeof (*(&thp)));
if (GNUNET_OK !=
- GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY,
- &thp,
- &rekey->sender_sig,
- &queue->target.public_key))
+ GNUNET_CRYPTO_eddsa_verify (
+ GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY,
+ &thp,
+ &rekey->sender_sig,
+ &queue->target.public_key))
{
GNUNET_break (0);
queue_finish (queue);
@@ -1447,7 +1448,8 @@ handshake_ack_monotime_cb (void *cls,
* @param queue The queue context.
*/
static void
-send_challenge (struct GNUNET_CRYPTO_ChallengeNonceP challenge, struct Queue *queue)
+send_challenge (struct GNUNET_CRYPTO_ChallengeNonceP challenge, struct
+ Queue *queue)
{
struct TCPConfirmationAck tca;
struct TcpHandshakeAckSignature thas;
@@ -2450,7 +2452,7 @@ boot_queue (struct Queue *queue)
* Generate and transmit our ephemeral key and the signature for
* the initial KX with the other peer. Must be called first, before
* any other bytes are ever written to the output buffer. Note that
- * our cipher must already be initialized when calling thi function.
+ * our cipher must already be initialized when calling this function.
* Helper function for #start_initial_kx_out().
*
* @param queue queue to do KX for
@@ -2472,7 +2474,8 @@ transmit_kx (struct Queue *queue,
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
&tc.challenge,
sizeof(tc.challenge));
- ths.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
+ ths.purpose.purpose = htonl (
+ GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
ths.purpose.size = htonl (sizeof(ths));
ths.sender = my_identity;
ths.receiver = queue->target;
@@ -2625,7 +2628,8 @@ decrypt_and_check_tc (struct Queue *queue,
sizeof(*tc),
&ibuf[sizeof(struct GNUNET_CRYPTO_EcdhePublicKey)],
sizeof(*tc)));
- ths.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
+ ths.purpose.purpose = htonl (
+ GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
ths.purpose.size = htonl (sizeof(ths));
ths.sender = tc->sender;
ths.receiver = my_identity;
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index 18ec0aa0b..7efe07fda 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -82,7 +82,7 @@
#include "transport.h"
/**
- * Maximum number of FC retransmissions for a runing retransmission task.
+ * Maximum number of FC retransmissions for a running retransmission task.
*/
#define MAX_FC_RETRANSMIT_COUNT 1000
@@ -1934,9 +1934,6 @@ struct Queue
};
-
-
-
/**
* A neighbour that at least one communicator is connected to.
*/
@@ -9827,7 +9824,7 @@ handle_send_message_ack (void *cls,
(unsigned long long) queue->qid,
(unsigned long long) sma->mid);
qe = qep;
- if ((NULL != qe->pm)&&(qe->pm->qe != qe))
+ if ((NULL != qe->pm) && (qe->pm->qe != qe))
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"For pending message %llu we had retransmissions.\n",
qe->pm->logging_uuid);
diff --git a/src/util/test_crypto_cs.c b/src/util/test_crypto_cs.c
index 914ded9bc..a56ff7421 100644
--- a/src/util/test_crypto_cs.c
+++ b/src/util/test_crypto_cs.c
@@ -241,7 +241,7 @@ test_calc_blindedc (const struct GNUNET_CRYPTO_CsBlindingSecret bs[2],
/* TEST 2
* Check if R' - aG -bX = R for b = 0
- * This test does the opposite operations and checks wether the equation is still correct.
+ * This test does the opposite operations and checks whether the equation is still correct.
*/
for (unsigned int b = 0; b <= 1; b++)
{
@@ -338,7 +338,7 @@ test_blind_sign (unsigned int *b,
/* TEST 2
* Check if s := rb + cbX
- * This test does the opposite operations and checks wether the equation is still correct.
+ * This test does the opposite operations and checks whether the equation is still correct.
*/
struct GNUNET_CRYPTO_Cs25519Scalar cb_mul_x;
struct GNUNET_CRYPTO_Cs25519Scalar s_min_rb;
@@ -393,7 +393,7 @@ test_unblinds (const struct GNUNET_CRYPTO_CsBlindS *blinded_signature_scalar,
/* TEST 2
* Check if s' := s + a mod p
- * This test does the opposite operations and checks wether the equation is still correct.
+ * This test does the opposite operations and checks whether the equation is still correct.
*/
struct GNUNET_CRYPTO_Cs25519Scalar s_min_a;