summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEvgeny Ermakov <evgeny.v.ermakov@gmail.com>2020-02-12 01:23:35 +1100
committerGarrett D'Amore <garrett@damore.org>2020-02-13 20:21:09 -0800
commit0a315e4e5f7d90789babba312079462953114e0d (patch)
tree193f07065b2145fca39406420666ee740166e117 /include
parentcdda78dbb793e10a5fcbd4748b9d82207ff0f19a (diff)
downloadnng-0a315e4e5f7d90789babba312079462953114e0d.tar.gz
nng-0a315e4e5f7d90789babba312079462953114e0d.tar.bz2
nng-0a315e4e5f7d90789babba312079462953114e0d.zip
Fix typos in comments
Diffstat (limited to 'include')
-rw-r--r--include/nng/compat/nanomsg/ipc.h2
-rw-r--r--include/nng/compat/nanomsg/nn.h2
-rw-r--r--include/nng/nng.h10
-rw-r--r--include/nng/supplemental/util/platform.h6
4 files changed, 10 insertions, 10 deletions
diff --git a/include/nng/compat/nanomsg/ipc.h b/include/nng/compat/nanomsg/ipc.h
index c935b50c..fad520d3 100644
--- a/include/nng/compat/nanomsg/ipc.h
+++ b/include/nng/compat/nanomsg/ipc.h
@@ -26,7 +26,7 @@ extern "C" {
// IPC options. Note that these are not currently supported.
// IPC_SEC_ATTR works quite differently in NNG, and must be
// configured using the new API. The buffer sizing options are
-// not supported at all. None of these were ever documente, and
+// not supported at all. None of these were ever documented, and
// are offered here only for source compatibility.
#define NN_IPC_SEC_ATTR 1
#define NN_IPC_OUTBUFSZ 2
diff --git a/include/nng/compat/nanomsg/nn.h b/include/nng/compat/nanomsg/nn.h
index 63431728..60c33c60 100644
--- a/include/nng/compat/nanomsg/nn.h
+++ b/include/nng/compat/nanomsg/nn.h
@@ -25,7 +25,7 @@
// error reporting facility expresses only a subset of the possibilities of
// nanomsg.
-// Note that unlinke nanomsg, nng does not aggressively recycle socket or
+// Note that unlike nanomsg, nng does not aggressively recycle socket or
// endpoint IDs, which means applications which made assumptions that these
// would be relatively small integers (e.g. to use them as array indices)
// may break. (No promise about values was ever made.)
diff --git a/include/nng/nng.h b/include/nng/nng.h
index 7cca4422..e061bd50 100644
--- a/include/nng/nng.h
+++ b/include/nng/nng.h
@@ -15,7 +15,7 @@
// The APIs have changed, and there is no attempt to provide API compatibility
// with legacy libnanomsg. This file defines the library consumer-facing
// Public API. Use of definitions or declarations not found in this header
-// file is specfically unsupported and strongly discouraged.
+// file is specifically unsupported and strongly discouraged.
#ifdef __cplusplus
extern "C" {
@@ -492,7 +492,7 @@ NNG_DECL int nng_ctx_open(nng_ctx *, nng_socket);
NNG_DECL int nng_ctx_close(nng_ctx);
// nng_ctx_id returns the numeric id for the context; this will be
-// a postive value for a valid context, or < 0 for an invalid context.
+// a positive value for a valid context, or < 0 for an invalid context.
// A valid context is not necessarily an *open* context.
NNG_DECL int nng_ctx_id(nng_ctx);
@@ -860,9 +860,9 @@ enum nng_flag_enum {
// Local TCP port number. This is used on a listener, and is intended
// to be used after starting the listener in combination with a wildcard
// (0) local port. This determines the actual ephemeral port that was
-// selected and bound. The value is provied as an int, but only the
+// selected and bound. The value is provided as an int, but only the
// low order 16 bits will be set. This is provided in native byte order,
-// which makes it more convienent than using the NNG_OPT_LOCADDR option.
+// which makes it more convenient than using the NNG_OPT_LOCADDR option.
#define NNG_OPT_TCP_BOUND_PORT "tcp-bound-port"
// IPC options. These will largely vary depending on the platform,
@@ -1053,7 +1053,7 @@ NNG_DECL int nng_device(nng_socket, nng_socket);
// Error codes. These generally have different values from UNIX errnos,
// so take care about converting them. The one exception is that 0 is
-// unambigiously "success".
+// unambiguously "success".
//
// NNG_SYSERR is a special code, which allows us to wrap errors from the
// underlying operating system. We generally prefer to map errors to one
diff --git a/include/nng/supplemental/util/platform.h b/include/nng/supplemental/util/platform.h
index 0fcc7d16..87e0305f 100644
--- a/include/nng/supplemental/util/platform.h
+++ b/include/nng/supplemental/util/platform.h
@@ -53,13 +53,13 @@ NNG_DECL int nng_thread_create(nng_thread **, void (*)(void *), void *);
// returns all resources for the thread are cleaned up.
NNG_DECL void nng_thread_destroy(nng_thread *);
-// nng_mtx represents a mutex, which is a simple, non-retrant, boolean lock.
+// nng_mtx represents a mutex, which is a simple, non-reentrant, boolean lock.
typedef struct nng_mtx nng_mtx;
// nng_mtx_alloc allocates a mutex structure.
NNG_DECL int nng_mtx_alloc(nng_mtx **);
-// nng_mtx_free frees the mutex. It most not be locked.
+// nng_mtx_free frees the mutex. It must not be locked.
NNG_DECL void nng_mtx_free(nng_mtx *);
// nng_mtx_lock locks the mutex; if it is already locked it will block
@@ -93,7 +93,7 @@ NNG_DECL void nng_cv_wake(nng_cv *);
// nng_cv_wake1 wakes only one thread waiting on the condition. This may
// reduce the thundering herd problem, but care must be taken to ensure
-// that no waiter starves forvever.
+// that no waiter starves forever.
NNG_DECL void nng_cv_wake1(nng_cv *);
// nng_random returns a "strong" (cryptographic sense) random number.