aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormochalins <117967760+mochalins@users.noreply.github.com>2025-05-23 17:02:52 +0900
committerGarrett D'Amore <garrett@damore.org>2025-06-02 07:24:06 -0700
commit4e1ffdca6d97c1bddc460835c94b16bc64284861 (patch)
tree80c27b0e509c8d7001619af27a33794f4bcad3c4 /src
parent1323aece0712522ccb2bf432b5085889a3513fa8 (diff)
downloadnng-4e1ffdca6d97c1bddc460835c94b16bc64284861.tar.gz
nng-4e1ffdca6d97c1bddc460835c94b16bc64284861.tar.bz2
nng-4e1ffdca6d97c1bddc460835c94b16bc64284861.zip
Fix typos across docs, comments, and CMake
Diffstat (limited to 'src')
-rw-r--r--src/core/file.h2
-rw-r--r--src/core/sockaddr.c2
-rw-r--r--src/core/socket.h2
-rw-r--r--src/platform/windows/win_socketpair.c2
-rw-r--r--src/sp/protocol/reqrep0/req_test.c2
-rw-r--r--src/sp/protocol/survey0/survey_test.c2
-rw-r--r--src/sp/transport.h6
-rw-r--r--src/sp/transport/udp/udp.c2
-rw-r--r--src/supplemental/http/http_server_test.c4
-rw-r--r--src/testing/nuts.h2
-rwxr-xr-xsrc/tools/nngcat/nngcat_ambiguous_test.sh2
-rw-r--r--src/tools/perf/pubdrop.c2
12 files changed, 15 insertions, 15 deletions
diff --git a/src/core/file.h b/src/core/file.h
index f89b1729..724b9d35 100644
--- a/src/core/file.h
+++ b/src/core/file.h
@@ -82,7 +82,7 @@ extern const char *nni_file_basename(const char *);
// false if an error occurs, or the path references something else.
extern bool nni_file_is_file(const char *);
-// nni_file_is_dir returns true if the path references a directroy. It returns
+// nni_file_is_dir returns true if the path references a directory. It returns
// false if an error occurs, or the path references something else.
extern bool nni_file_is_dir(const char *);
diff --git a/src/core/sockaddr.c b/src/core/sockaddr.c
index 15842b82..9dbb1c6c 100644
--- a/src/core/sockaddr.c
+++ b/src/core/sockaddr.c
@@ -87,7 +87,7 @@ nni_inet_ntop(const uint8_t addr[16], char buf[46])
idx += 2;
sep = false;
} else if (i < maxoff || i >= maxoff + maxcnt) {
- // this takes at most six bytes -- four hax digits a
+ // this takes at most six bytes -- four hex digits a
// colon, and a null
NNI_ASSERT(idx <= 40);
snprintf(buf + idx, 6, sep ? ":%x" : "%x",
diff --git a/src/core/socket.h b/src/core/socket.h
index d84f22c2..f18a4e15 100644
--- a/src/core/socket.h
+++ b/src/core/socket.h
@@ -89,7 +89,7 @@ extern void *nni_ctx_proto_data(nni_ctx *);
// by the context is also released.
extern void nni_ctx_rele(nni_ctx *);
-// nni_ctx_close is used to close the context. It also implictly releases
+// nni_ctx_close is used to close the context. It also implicitly releases
// the context.
extern void nni_ctx_close(nni_ctx *);
diff --git a/src/platform/windows/win_socketpair.c b/src/platform/windows/win_socketpair.c
index 57820c72..c788cd95 100644
--- a/src/platform/windows/win_socketpair.c
+++ b/src/platform/windows/win_socketpair.c
@@ -10,7 +10,7 @@
#include "core/nng_impl.h"
#ifdef NNG_HAVE_SOCKETPAIR_TODO
-// TODO: Windows lacks socketpair. We can emulate it with an explcit
+// TODO: Windows lacks socketpair. We can emulate it with an explicit
// implementation based on AF_UNIX.
#include <errno.h>
diff --git a/src/sp/protocol/reqrep0/req_test.c b/src/sp/protocol/reqrep0/req_test.c
index 17378c89..1da63ffc 100644
--- a/src/sp/protocol/reqrep0/req_test.c
+++ b/src/sp/protocol/reqrep0/req_test.c
@@ -429,7 +429,7 @@ test_req_cancel_abort_recv(void)
// Send req #1 (abc).
NUTS_SEND(req, "abc");
- // Wait for it to get ot the other side.
+ // Wait for it to get to the other side.
NUTS_SLEEP(100);
nng_aio_set_timeout(aio, 5 * SECOND);
diff --git a/src/sp/protocol/survey0/survey_test.c b/src/sp/protocol/survey0/survey_test.c
index bf6fbb08..ac6767ba 100644
--- a/src/sp/protocol/survey0/survey_test.c
+++ b/src/sp/protocol/survey0/survey_test.c
@@ -228,7 +228,7 @@ test_surv_cancel_abort_recv(void)
// Send survey #1 (abc).
NUTS_SEND(surv, "abc");
- // Wait for it to get ot the other side.
+ // Wait for it to get to the other side.
NUTS_SLEEP(100);
nng_aio_set_timeout(aio, 5 * SECOND);
diff --git a/src/sp/transport.h b/src/sp/transport.h
index 6aa2086b..72ce18d7 100644
--- a/src/sp/transport.h
+++ b/src/sp/transport.h
@@ -20,7 +20,7 @@
// protocol-independent fashion. The socket makes individual calls,
// which are expected to block if appropriate (except for destroy), or
// run asynchronously if an aio is provided. Endpoints are unable to
-// call back into the socket, to prevent recusive entry and deadlock.
+// call back into the socket, to prevent recursive entry and deadlock.
//
// For a given endpoint, the framework holds a lock so that each entry
// point is run exclusively of the others. (Transports must still guard
@@ -63,7 +63,7 @@ struct nni_sp_dialer_ops {
// This may be NULL if the dialer does not support TLS.
nng_err (*d_get_tls)(void *, nng_tls_config **);
- // d_set_tls is used to set the TLS configruation to use for the
+ // d_set_tls is used to set the TLS configuration to use for the
// dialer. This may be NULL if this dialer does not support TLS.
nng_err (*d_set_tls)(void *, nng_tls_config *);
@@ -117,7 +117,7 @@ struct nni_sp_listener_ops {
// This may be NULL if the listener does not support TLS.
nng_err (*l_get_tls)(void *, nng_tls_config **);
- // l_set_tls is used to set the TLS configruation to use for listening.
+ // l_set_tls is used to set the TLS configuration to use for listening.
// This may be NULL if this listener does not support TLS.
nng_err (*l_set_tls)(void *, nng_tls_config *);
diff --git a/src/sp/transport/udp/udp.c b/src/sp/transport/udp/udp.c
index e19a5684..41519aa3 100644
--- a/src/sp/transport/udp/udp.c
+++ b/src/sp/transport/udp/udp.c
@@ -726,7 +726,7 @@ udp_recv_creq(udp_ep *ep, udp_sp_creq *creq, nng_sockaddr *sa)
if ((p = udp_find_pipe(ep, creq->us_peer_id, creq->us_sender_id))) {
if ((p->peer_id == 0) || (p->peer != creq->us_type)) {
// we don't expect this -- a connection request from a
- // peer while we have an oustanding request of our own.
+ // peer while we have an outstanding request of our own.
// We *could* compare the sockaddrs to see if they
// match and if so then treat this as just a dueling
// connection. but for now we just discard it -- we'll
diff --git a/src/supplemental/http/http_server_test.c b/src/supplemental/http/http_server_test.c
index e091cd89..b55acd59 100644
--- a/src/supplemental/http/http_server_test.c
+++ b/src/supplemental/http/http_server_test.c
@@ -349,7 +349,7 @@ test_server_404(void)
}
static void
-test_server_no_authoritive_form(void)
+test_server_no_authoritative_form(void)
{
struct server_test st;
nng_http_handler *h;
@@ -1108,7 +1108,7 @@ NUTS_TESTS = {
{ "server canonify", test_server_canonify },
{ "server head", test_server_head },
{ "server 404", test_server_404 },
- { "server authoritiative form", test_server_no_authoritive_form },
+ { "server authoritiative form", test_server_no_authoritative_form },
{ "server bad canonify", test_server_bad_canonify },
{ "server bad version", test_server_bad_version },
{ "server missing host", test_server_missing_host },
diff --git a/src/testing/nuts.h b/src/testing/nuts.h
index d821b359..05e639b2 100644
--- a/src/testing/nuts.h
+++ b/src/testing/nuts.h
@@ -23,7 +23,7 @@ extern void nuts_logger(
nng_log_level, nng_log_facility, const char *, const char *);
// Call nng_fini during test finalization -- this avoids leak warnings.
-/// We add a 20 millisecond delay as a hack to allow for other subsytems to
+/// We add a 20 millisecond delay as a hack to allow for other subsystems to
// drain first. (Notably the HTTP framework can fail if we shut down too
// quickly. These bugs should be fixed and then the sleep can be removed.)
#ifndef TEST_FINI
diff --git a/src/tools/nngcat/nngcat_ambiguous_test.sh b/src/tools/nngcat/nngcat_ambiguous_test.sh
index 944d5aed..264d4704 100755
--- a/src/tools/nngcat/nngcat_ambiguous_test.sh
+++ b/src/tools/nngcat/nngcat_ambiguous_test.sh
@@ -17,7 +17,7 @@ CMD="${NNGCAT} --re --dial=tcp://127.0.0.1:27272"
echo -n "Verify ambiguous options fail: "
if ${CMD} >/dev/null 2>&1
then
- echo "Failed: ambigous accepted"
+ echo "Failed: ambiguous accepted"
exit 1
fi
x=$(${CMD} 2>&1)
diff --git a/src/tools/perf/pubdrop.c b/src/tools/perf/pubdrop.c
index 1788a3cf..83524609 100644
--- a/src/tools/perf/pubdrop.c
+++ b/src/tools/perf/pubdrop.c
@@ -108,7 +108,7 @@ parse_int(const char *arg, const char *what)
char *eptr;
val = strtol(arg, &eptr, 10);
- // Must be a postive number less than around a billion.
+ // Must be a positive number less than around a billion.
if ((val < 0) || (val > (1 << 30)) || (*eptr != 0) || (eptr == arg)) {
die("Invalid %s", what);
}