From 2693e416142bb5da10d74700595d69ddaae071cd Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Sat, 22 Aug 2020 10:49:37 -0400 Subject: all: run ./tools/check-syntax over the code This patch updates the code for the newly added spell checking. Reviewed-by: Tom Hromatka Signed-off-by: Paul Moore --- include/seccomp-syscalls.h | 2 +- include/seccomp.h.in | 4 ++-- src/arch.c | 8 ++++---- src/db.c | 4 ++-- src/gen_bpf.c | 12 ++++++------ src/system.h | 2 +- tools/scmp_bpf_sim.c | 2 +- tools/util.c | 16 ++++++++-------- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/include/seccomp-syscalls.h b/include/seccomp-syscalls.h index 2a4ebd3..c7ec7b1 100644 --- a/include/seccomp-syscalls.h +++ b/include/seccomp-syscalls.h @@ -24,7 +24,7 @@ #endif /* - * psuedo syscall definitions + * pseudo syscall definitions */ /* socket syscalls */ diff --git a/include/seccomp.h.in b/include/seccomp.h.in index ef4c6e4..1e47de9 100644 --- a/include/seccomp.h.in +++ b/include/seccomp.h.in @@ -800,11 +800,11 @@ int seccomp_notify_fd(const scmp_filter_ctx ctx); int seccomp_export_pfc(const scmp_filter_ctx ctx, int fd); /** - * Generate seccomp Berkley Packet Filter (BPF) code and export it to a file + * Generate seccomp Berkeley Packet Filter (BPF) code and export it to a file * @param ctx the filter context * @param fd the destination fd * - * This function generates seccomp Berkley Packer Filter (BPF) code and writes + * This function generates seccomp Berkeley Packer Filter (BPF) code and writes * it to the given fd. Returns zero on success, negative values on failure. * */ diff --git a/src/arch.c b/src/arch.c index 5485eb8..73bf710 100644 --- a/src/arch.c +++ b/src/arch.c @@ -116,7 +116,7 @@ int arch_valid(uint32_t arch) /** * Lookup the architecture definition - * @param token the architecure token + * @param token the architecture token * * Return the matching architecture definition, returns NULL on failure. * @@ -169,7 +169,7 @@ const struct arch_def *arch_def_lookup(uint32_t token) /** * Lookup the architecture definition by name - * @param arch_name the architecure name + * @param arch_name the architecture name * * Return the matching architecture definition, returns NULL on failure. * @@ -328,8 +328,8 @@ const char *arch_syscall_resolve_num(const struct arch_def *arch, int num) * @param arch the architecture definition * @param syscall the syscall number * - * Translate the syscall number, in the context of the native architecure, to - * the provided architecure. Returns zero on success, negative values on + * Translate the syscall number, in the context of the native architecture, to + * the provided architecture. Returns zero on success, negative values on * failure. * */ diff --git a/src/db.c b/src/db.c index 836171a..2dc9733 100644 --- a/src/db.c +++ b/src/db.c @@ -1058,7 +1058,7 @@ int db_col_reset(struct db_filter_col *col, uint32_t def_action) free(col->filters); col->filters = NULL; - /* set the endianess to undefined */ + /* set the endianness to undefined */ col->endian = 0; /* set the default attribute values */ @@ -1222,7 +1222,7 @@ int db_col_merge(struct db_filter_col *col_dst, struct db_filter_col *col_src) unsigned int iter_a, iter_b; struct db_filter **dbs; - /* verify that the endianess is a match */ + /* verify that the endianness is a match */ if (col_dst->endian != col_src->endian) return -EDOM; diff --git a/src/gen_bpf.c b/src/gen_bpf.c index f7b6eca..6961d09 100644 --- a/src/gen_bpf.c +++ b/src/gen_bpf.c @@ -205,11 +205,11 @@ static struct bpf_blk *_hsh_remove(struct bpf_state *state, uint64_t h_val); static struct bpf_blk *_hsh_find(const struct bpf_state *state, uint64_t h_val); /** - * Convert a 16-bit host integer into the target's endianess + * Convert a 16-bit host integer into the target's endianness * @param arch the architecture definition * @param val the 16-bit integer * - * Convert the endianess of the supplied value and return it to the caller. + * Convert the endianness of the supplied value and return it to the caller. * */ static uint16_t _htot16(const struct arch_def *arch, uint16_t val) @@ -221,11 +221,11 @@ static uint16_t _htot16(const struct arch_def *arch, uint16_t val) } /** - * Convert a 32-bit host integer into the target's endianess + * Convert a 32-bit host integer into the target's endianness * @param arch the architecture definition * @param val the 32-bit integer * - * Convert the endianess of the supplied value and return it to the caller. + * Convert the endianness of the supplied value and return it to the caller. * */ static uint32_t _htot32(const struct arch_def *arch, uint32_t val) @@ -1303,7 +1303,7 @@ static inline bool _skip_syscall(struct bpf_state *state, if (!syscall->valid) return true; - /* psuedo-syscalls should not be added to the filter unless explicity + /* psuedo-syscalls should not be added to the filter unless explicitly * requested via SCMP_FLTATR_API_TSKIP */ if (((int)syscall->num < 0) && @@ -1662,7 +1662,7 @@ out: * @param db_secondary the secondary DB * * Generate the BPF instruction block for the given filter DB(s)/architecture(s) - * and return a pointer to the block on succes, NULL on failure. The resulting + * and return a pointer to the block on success, NULL on failure. The resulting * block assumes that the architecture token has already been loaded into the * BPF accumulator. * diff --git a/src/system.h b/src/system.h index 096f3ca..b8c2bc9 100644 --- a/src/system.h +++ b/src/system.h @@ -91,7 +91,7 @@ struct seccomp_data { /* rename some of the socket filter types to make more sense */ typedef struct sock_filter bpf_instr_raw; -/* no new privs defintions */ +/* no new privs definitions */ #ifndef PR_SET_NO_NEW_PRIVS #define PR_SET_NO_NEW_PRIVS 38 #endif diff --git a/tools/scmp_bpf_sim.c b/tools/scmp_bpf_sim.c index a381314..3b581c6 100644 --- a/tools/scmp_bpf_sim.c +++ b/tools/scmp_bpf_sim.c @@ -328,7 +328,7 @@ int main(int argc, char *argv[]) } } - /* adjust the endianess of sys_data to match the target */ + /* adjust the endianness of sys_data to match the target */ sys_data.nr = htot32(arch, sys_data.nr); sys_data.arch = htot32(arch, arch); sys_data.instruction_pointer = htot64(arch, diff --git a/tools/util.c b/tools/util.c index 5687b30..7da22f4 100644 --- a/tools/util.c +++ b/tools/util.c @@ -88,11 +88,11 @@ uint32_t arch = ARCH_NATIVE; /** - * Convert a 16-bit target integer into the host's endianess + * Convert a 16-bit target integer into the host's endianness * @param arch_token the architecture token * @param val the 16-bit integer * - * Convert the endianess of the supplied value and return it to the caller. + * Convert the endianness of the supplied value and return it to the caller. * */ uint16_t ttoh16(uint32_t arch_token, uint16_t val) @@ -104,11 +104,11 @@ uint16_t ttoh16(uint32_t arch_token, uint16_t val) } /** - * Convert a 32-bit target integer into the host's endianess + * Convert a 32-bit target integer into the host's endianness * @param arch_token the architecture token * @param val the 32-bit integer * - * Convert the endianess of the supplied value and return it to the caller. + * Convert the endianness of the supplied value and return it to the caller. * */ uint32_t ttoh32(uint32_t arch_token, uint32_t val) @@ -120,11 +120,11 @@ uint32_t ttoh32(uint32_t arch_token, uint32_t val) } /** - * Convert a 32-bit host integer into the target's endianess + * Convert a 32-bit host integer into the target's endianness * @param arch_token the architecture token * @param val the 32-bit integer * - * Convert the endianess of the supplied value and return it to the caller. + * Convert the endianness of the supplied value and return it to the caller. * */ uint32_t htot32(uint32_t arch_token, uint32_t val) @@ -136,11 +136,11 @@ uint32_t htot32(uint32_t arch_token, uint32_t val) } /** - * Convert a 64-bit host integer into the target's endianess + * Convert a 64-bit host integer into the target's endianness * @param arch_token the architecture token * @param val the 64-bit integer * - * Convert the endianess of the supplied value and return it to the caller. + * Convert the endianness of the supplied value and return it to the caller. * */ uint64_t htot64(uint32_t arch_token, uint64_t val) -- cgit v1.2.1