Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix many typos #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ccan/aga/aga.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
* callback itself. If the latter, it MUST have been initialized
* with aga_node_init() before the edge callback returns.
*
* - If a node is contructed by the edge callback, any subsequent
* - If a node is constructed by the edge callback, any subsequent
* reference to that node by the edge callback for *any* node and
* index MUST use the same pointer.
*
Expand Down Expand Up @@ -107,7 +107,7 @@
* - After an error is encountered aga_error() will return a non-zero
* value. Negative values are reserved for errors reported by the
* user supplied edge callback. Positive values are reserved for
* errors detected interally by aga.
* errors detected internally by aga.
*
* - Errors are cleared on aga_finish().
*/
Expand Down
2 changes: 1 addition & 1 deletion ccan/alignof/_info
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* alignment may cause performance loss or even program failure (eg. a
* bus signal).
*
* There are times which it's useful to be able to programatically
* There are times which it's useful to be able to programmatically
* access these requirements, such as for dynamic allocators.
*
* Example:
Expand Down
2 changes: 1 addition & 1 deletion ccan/antithread/examples/arabella.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static void paint_triangle(struct image *image, const struct triangle *tri)
x1 = tri->coord[i1].x, y1 = tri->coord[i1].y;
x2 = tri->coord[i2].x, y2 = tri->coord[i2].y;

// test for easy cases, else split triangle in two and render both halfs
// test for easy cases, else split triangle in two and render both halves
if (y1 == y2) {
if (x1 > x2) swap(&x1, &x2);
add_flat_triangle(image, x1, y1, x2, y2, x0, y0,
Expand Down
2 changes: 1 addition & 1 deletion ccan/argcheck/argcheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ argcheck_log_(const char *file, int line, const char *func,

/*

below is the actual implemenation. do not use it directly, use the macros
below is the actual implementation. do not use it directly, use the macros
above instead

*/
Expand Down
2 changes: 1 addition & 1 deletion ccan/bdelta/bdelta.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static BDELTAcode build_triangle(
*
* * Every V array is preserved per iteration of the outer loop.
* This is necessary so we can determine the actual patch, not just
* the length of the shortest edit string. See the coment above
* the length of the shortest edit string. See the comment above
* the definition of Triangle for an in-depth explanation.
*
* * Array items are stored consecutively so as to not waste space.
Expand Down
2 changes: 1 addition & 1 deletion ccan/check_type/_info
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* a precise type isn't used.
*
* On compilers which don't support typeof() these routines are less effective,
* since they have to use sizeof() which can only distiguish between types of
* since they have to use sizeof() which can only distinguish between types of
* different size.
*
* License: CC0 (Public domain)
Expand Down
2 changes: 1 addition & 1 deletion ccan/coroutine/coroutine.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ coroutine_stack_from_metadata(void *metadata, size_t metasize)
* @stack: coroutine stack
*
* Returns the size of the coroutine stack @stack. This does not
* include the overhead of struct coroutine_stack or metdata.
* include the overhead of struct coroutine_stack or metadata.
*/
size_t coroutine_stack_size(const struct coroutine_stack *stack);

Expand Down
2 changes: 1 addition & 1 deletion ccan/cpuid/cpuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* Extended L2 Cache features.
*
* %CPUID_ADV_POWER_MGT_INFO:
* Advaned power management information.
* Advanced power management information.
*
* %CPUID_VIRT_PHYS_ADDR_SIZES:
* Virtual and physical address sizes.
Expand Down
2 changes: 1 addition & 1 deletion ccan/crypto/hmac_sha256/_info
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* #include <stdio.h>
* #include <string.h>
*
* // Simple demonstration: idential strings will have the same hash, but
* // Simple demonstration: identical strings will have the same hash, but
* // two different strings will not.
* int main(int argc, char *argv[])
* {
Expand Down
2 changes: 1 addition & 1 deletion ccan/crypto/ripemd160/_info
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* #include <stdio.h>
* #include <string.h>
*
* // Simple demonstration: idential strings will have the same hash, but
* // Simple demonstration: identical strings will have the same hash, but
* // two different strings will not.
* int main(int argc, char *argv[])
* {
Expand Down
4 changes: 2 additions & 2 deletions ccan/crypto/ripemd160/ripemd160.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ void ripemd160_init(struct ripemd160_ctx *ctx);
/**
* RIPEMD160_INIT - initializer for an RIPEMD160 context.
*
* This can be used to staticly initialize an RIPEMD160 context (instead
* of ripemd160_init()).
* This can be used to statically initialize an RIPEMD160 context
* (instead of ripemd160_init()).
*
* Example:
* static void hash_all(const char **arr, struct ripemd160 *hash)
Expand Down
2 changes: 1 addition & 1 deletion ccan/crypto/sha256/_info
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* #include <stdio.h>
* #include <string.h>
*
* // Simple demonstration: idential strings will have the same hash, but
* // Simple demonstration: identical strings will have the same hash, but
* // two different strings will not.
* int main(int argc, char *argv[])
* {
Expand Down
2 changes: 1 addition & 1 deletion ccan/crypto/sha256/benchmarks/sha256_avx2_rorx8.asm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ _IDX_LIMIT_SIZE equ 8
_RSP_SIZE equ 8

;; KTMSG must overlap TMSG such that the second 3/4 of KTMSG overlaps the
;; first 3/4 of TMSG. (We onl need 16 words of TMSG at any time.)
;; first 3/4 of TMSG. (We only need 16 words of TMSG at any time.)
_KTMSG equ _EXTRA_SIZE
_TMSG equ _KTMSG + _KTMSG_SIZE
_XMM_SAVE equ _TMSG + _TMSG_SIZE
Expand Down
2 changes: 1 addition & 1 deletion ccan/crypto/siphash24/siphash24.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void siphash24_init(struct siphash24_ctx *ctx, const struct siphash_seed *seed);
* SIPHASH24_INIT - initializer for an SIPHASH24 context.
* @seed1, @seed2: two 64-bit words for seed.
*
* This can be used to staticly initialize an SIPHASH24 context (instead
* This can be used to statically initialize an SIPHASH24 context (instead
* of siphash24_init()).
*
* Example:
Expand Down
2 changes: 1 addition & 1 deletion ccan/crypto/siphash24/test/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int main(void)
/* This is how many tests you plan to run */
plan_tests(1 + MAXLEN * 2);

/* Initialzed an manually created should give same results. */
/* Initialized an manually created should give same results. */
for (i = 0; i < sizeof(seed.u.u8); i++)
seed.u.u8[i] = i;
siphash24_init(&ctx2, &seed);
Expand Down
2 changes: 1 addition & 1 deletion ccan/endian/endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ typedef uint16_t ENDIAN_TYPE beint16_t;
#define BE64_TO_CPU(le_val) BSWAP_64((ENDIAN_CAST uint64_t)le_val)
#define BE32_TO_CPU(le_val) BSWAP_32((ENDIAN_CAST uint32_t)le_val)
#define BE16_TO_CPU(le_val) BSWAP_16((ENDIAN_CAST uint16_t)le_val)
#endif /* HAVE_LITTE_ENDIAN */
#endif /* HAVE_LITTLE_ENDIAN */


/**
Expand Down
4 changes: 2 additions & 2 deletions ccan/failtest/failtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ static void restore_contents(struct failtest_call *opener,
}
}

/* We save/restore most things on demand, but always do mmaped files. */
/* We save/restore most things on demand, but always do mmapped files. */
static void save_mmapped_files(void)
{
struct failtest_call *i;
Expand Down Expand Up @@ -621,7 +621,7 @@ static NORETURN void failtest_cleanup(bool forced_cleanup, int status)
}
}

/* Put back mmaped files the way our parent (if any) expects. */
/* Put back mmapped files the way our parent (if any) expects. */
free_mmapped_files(true);

free_everything();
Expand Down
2 changes: 1 addition & 1 deletion ccan/graphql/test/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -3105,7 +3105,7 @@ int main(void)
RUN2(check_string_value, "\"te\\tst\"", "te\tst" ); // Check escape sequence.
RUN2(check_string_value, "\"te\\vst\"", NULL ); // Invalid escape sequence.
RUN2(check_string_value, "\"te\\033st\"", NULL ); // Invalid escape sequence.
// Note: Unicode excape sequence is tested below.
// Note: Unicode escape sequence is tested below.

// This block string and this string should result in identical tokens.
sprintf(source, "\
Expand Down
4 changes: 2 additions & 2 deletions ccan/hash/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* #include <stdio.h>
* #include <string.h>
*
* // Simple demonstration: idential strings will have the same hash, but
* // Simple demonstration: identical strings will have the same hash, but
* // two different strings will probably not.
* int main(int argc, char *argv[])
* {
Expand Down Expand Up @@ -164,7 +164,7 @@ static inline uint32_t hash_string(const char *string)
* #include <stdio.h>
* #include <string.h>
*
* // Simple demonstration: idential strings will have the same hash, but
* // Simple demonstration: identical strings will have the same hash, but
* // two different strings will probably not.
* int main(int argc, char *argv[])
* {
Expand Down
2 changes: 1 addition & 1 deletion ccan/idtree/_info
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* #include <stdlib.h>
* #include <stdio.h>
*
* // Silly example which puts args in the idtree and retreives them
* // Silly example which puts args in the idtree and retrieves them
* int main(int argc, char *argv[])
* {
* struct idtree *idtree = idtree_new(NULL);
Expand Down
2 changes: 1 addition & 1 deletion ccan/io/benchmarks/run-loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int main(void)
last_read = fds[0];
}

/* Last one completes the cirle. */
/* Last one completes the circle. */
i = 0;
buf[i].iters = 0;
sprintf(buf[i].buf, "%i-%i", i, i);
Expand Down
2 changes: 1 addition & 1 deletion ccan/io/test/run-10-many.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int main(void)
if (!ok1(i == NUM))
exit(exit_status());

/* Last one completes the cirle. */
/* Last one completes the circle. */
i = 0;
sprintf(buf[i].buf, "%i-%i", i, i);
buf[i].reader = io_new_conn(NULL, last_read, setup_reader, &buf[i]);
Expand Down
2 changes: 1 addition & 1 deletion ccan/isaac/_info
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
* It is the fastest 32-bit generator among all of those that pass the
* statistical tests in the recent survey
* http://www.iro.umontreal.ca/~simardr/testu01/tu01.html, with the exception
* of Marsa-LFIB4, and it is quite competitive on 64-bit archtectures.
* of Marsa-LFIB4, and it is quite competitive on 64-bit architectures.
*
* Unlike Marsa-LFIB4 (and all other LFib generators), there are no linear
* dependencies between successive values, and unlike many generators found in
Expand Down
2 changes: 1 addition & 1 deletion ccan/iscsi/iscsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ int iscsi_nop_out_async(struct iscsi_context *iscsi, iscsi_command_cb cb, unsign
* The content of command_data depends on the status type.
*
* status :
* ISCSI_STATUS_GOOD the scsi command completed successfullt on the target.
* ISCSI_STATUS_GOOD the scsi command completed successfully on the target.
* If this scsi command returns DATA-IN, that data is stored in an scsi_task structure
* returned in the command_data parameter. This buffer will be automatically freed once the callback
* returns.
Expand Down
2 changes: 1 addition & 1 deletion ccan/iscsi/login.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ int iscsi_process_logout_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pd
int iscsi_set_session_type(struct iscsi_context *iscsi, enum iscsi_session_type session_type)
{
if (iscsi == NULL) {
printf("Trying to set sesssion type on NULL context\n");
printf("Trying to set session type on NULL context\n");
return -1;
}
if (iscsi->is_loggedin) {
Expand Down
2 changes: 1 addition & 1 deletion ccan/lbalance/_info
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* Example:
* // Run 1000 of the given commandline at best-known parallel rate.
* // See tools/lbalance.c for a sligtly more serious example.
* // See tools/lbalance.c for a slightly more serious example.
* #include <ccan/lbalance/lbalance.h>
* #include <sys/types.h>
* #include <sys/time.h>
Expand Down
2 changes: 1 addition & 1 deletion ccan/lstack/lstack.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* struct lstack_link - a stack link
* @down: immedately lower entry in the stack, or NULL if this is the bottom.
* @down: immediately lower entry in the stack, or NULL if this is the bottom.
*
* This is used as an entry in a stack.
*
Expand Down
2 changes: 1 addition & 1 deletion ccan/membuf/membuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct membuf {
TCON_WRAP(struct membuf, membertype canary)

/**
* membuf_init - initialize a type-specfic membuf.
* membuf_init - initialize a type-specific membuf.
* @mb: the MEMBUF() declared membuf.
* @elems: the initial buffer, if any.
* @max_elems: the initial space @elems, in number of elements.
Expand Down
2 changes: 1 addition & 1 deletion ccan/nfs/libnfs-raw.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ typedef void (*rpc_cb)(struct rpc_context *rpc, int status, void *data, void *pr
* RPC_STATUS_SUCCESS : The tcp connection was successfully established.
* data is NULL.
* RPC_STATUS_ERROR : The connection failed to establish.
* data is the erro string.
* data is the error string.
* RPC_STATUS_CANCEL : The connection attempt was aborted before it could complete.
* : data is NULL.
*/
Expand Down
4 changes: 2 additions & 2 deletions ccan/nfs/libnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ static void nfs_mount_1_cb(struct rpc_context *rpc, int status, void *command_da
}

/*
* Async call for mounting an nfs share and geting the root filehandle
* Async call for mounting an nfs share and getting the root filehandle
*/
int nfs_mount_async(struct nfs_context *nfs, const char *server, const char *export, nfs_cb cb, void *private_data)
{
Expand Down Expand Up @@ -554,7 +554,7 @@ static int nfs_lookuppath_async(struct nfs_context *nfs, const char *path, nfs_c
struct nfs_cb_data *data;

if (path[0] != '/') {
rpc_set_error(nfs->rpc, "Pathname is not absulute %s", path);
rpc_set_error(nfs->rpc, "Pathname is not absolute %s", path);
return -1;
}

Expand Down
18 changes: 9 additions & 9 deletions ccan/nfs/nfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ int nfs_close_sync(struct nfs_context *nfs, struct nfsfh *nfsfh);
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes read.
* status is number of bytes read.
* data is a pointer to the returned data.
* -errno : An error occurred.
* data is the error string.
Expand All @@ -235,7 +235,7 @@ int nfs_pread_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offs
/*
* Sync pread()
* Function returns
* >=0 : numer of bytes read.
* >=0 : number of bytes read.
* -errno : An error occurred.
*/
int nfs_pread_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, size_t count, char *buf);
Expand All @@ -254,7 +254,7 @@ int nfs_pread_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offse
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes read.
* status is number of bytes read.
* data is a pointer to the returned data.
* -errno : An error occurred.
* data is the error string.
Expand All @@ -263,7 +263,7 @@ int nfs_read_async(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, n
/*
* Sync read()
* Function returns
* >=0 : numer of bytes read.
* >=0 : number of bytes read.
* -errno : An error occurred.
*/
int nfs_read_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf);
Expand All @@ -283,15 +283,15 @@ int nfs_read_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, ch
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes written.
* status is number of bytes written.
* -errno : An error occurred.
* data is the error string.
*/
int nfs_pwrite_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, size_t count, char *buf, nfs_cb cb, void *private_data);
/*
* Sync pwrite()
* Function returns
* >=0 : numer of bytes written.
* >=0 : number of bytes written.
* -errno : An error occurred.
*/
int nfs_pwrite_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, size_t count, char *buf);
Expand All @@ -309,15 +309,15 @@ int nfs_pwrite_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offs
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes written.
* status is number of bytes written.
* -errno : An error occurred.
* data is the error string.
*/
int nfs_write_async(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf, nfs_cb cb, void *private_data);
/*
* Sync write()
* Function returns
* >=0 : numer of bytes written.
* >=0 : number of bytes written.
* -errno : An error occurred.
*/
int nfs_write_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf);
Expand All @@ -343,7 +343,7 @@ int nfs_lseek_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offs
/*
* Sync lseek()
* Function returns
* >=0 : numer of bytes read.
* >=0 : number of bytes read.
* -errno : An error occurred.
*/
int nfs_lseek_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, int whence, nfs_off_t *current_offset);
Expand Down
2 changes: 1 addition & 1 deletion ccan/opt/opt.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ void opt_log_stderr(const char *fmt, ...);
* when handed to opt_parse, opt_parse will never return false.
*
* Example:
* // This never returns false; just exits if there's an erorr.
* // This never returns false; just exits if there's an error.
* opt_parse(&argc, argv, opt_log_stderr_exit);
*/
void opt_log_stderr_exit(const char *fmt, ...);
Expand Down
Loading