Fix typos in documentation, comments, etc. Via codespell. Signed-off-by: Andrew Kreimer <algonell@xxxxxxxxx> --- smatch_annotate.c | 4 ++-- smatch_comparison.c | 2 +- smatch_extra.c | 6 +++--- smatch_implied.c | 2 +- smatch_locking.c | 2 +- smatch_math.c | 2 +- smatch_param_compare_limit.c | 2 +- smatch_parsed_conditions.c | 2 +- smatch_ssa.c | 2 +- smatch_strlen.c | 2 +- smatch_struct_assignment.c | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/smatch_annotate.c b/smatch_annotate.c index 21df3d1b..be1f3d09 100644 --- a/smatch_annotate.c +++ b/smatch_annotate.c @@ -41,8 +41,8 @@ void register_annotate(int id) { /* * Technically snprintf() returns the number of bytes which *would* have - * been printed. I do try caclulating that in check_snprintf(). But - * it probably works better to assume the limitter is accurate. + * been printed. I do try calculating that in check_snprintf(). But + * it probably works better to assume the limiter is accurate. */ add_implied_return_hook("snprintf", ¶m_caps_return, INT_PTR(1)); diff --git a/smatch_comparison.c b/smatch_comparison.c index 4f18a848..fef45c37 100644 --- a/smatch_comparison.c +++ b/smatch_comparison.c @@ -1185,7 +1185,7 @@ static void handle_for_loops(struct expression *expr, char *state_name, struct s return; } - /* Second time checking the condtion */ + /* Second time checking the condition */ if (__prev_stmt != __cur_stmt->iterator_post_statement) return; diff --git a/smatch_extra.c b/smatch_extra.c index 60cf794f..53210640 100644 --- a/smatch_extra.c +++ b/smatch_extra.c @@ -1327,7 +1327,7 @@ static void clear_pointed_at_state(struct expression *expr) struct symbol *type; /* - * ALERT: This is sort of a mess. If it's is a struct assigment like + * ALERT: This is sort of a mess. If it's is a struct assignment like * "foo = bar;", then that's handled by smatch_struct_assignment.c. * the same thing for p++ where "p" is a struct. Most modifications * are handled by the assignment hook or the db. Smatch_extra.c doesn't @@ -1549,7 +1549,7 @@ static int handle_postop_inc(struct expression *left, int op, struct expression false_state = alloc_estate_range(add_one(limit), add_one(limit)); /* Currently we just discard the false state but when two passes is - * implimented correctly then it will use it. + * implemented correctly then it will use it. */ set_extra_expr_true_false(left->unop, true_state, false_state); @@ -2544,7 +2544,7 @@ struct range_list *intersect_with_real_abs_var_sym(const char *name, struct symb * with the real absolute to say that actually it's 0-8. * * We are combining it here. But now that I think about it, this is - * probably not the ideal place to combine it because it should proably + * probably not the ideal place to combine it because it should probably * be done earlier. Oh well, this is an improvement on what was there * before so I'm going to commit this code. * diff --git a/smatch_implied.c b/smatch_implied.c index 2b5fab02..9055d676 100644 --- a/smatch_implied.c +++ b/smatch_implied.c @@ -90,7 +90,7 @@ static bool implications_turned_off(int owner) /* * tmp_range_list(): - * It messes things up to free range list allocations. This helper fuction + * It messes things up to free range list allocations. This helper function * lets us reuse memory instead of doing new allocations. */ static struct range_list *tmp_range_list(struct symbol *type, long long num) diff --git a/smatch_locking.c b/smatch_locking.c index 80e4b057..26f8e622 100644 --- a/smatch_locking.c +++ b/smatch_locking.c @@ -755,7 +755,7 @@ static void match_class_destructor(const char *fn, struct expression *expr, void * as well because sometimes it's like the assignment is: * * scope = class_mutex_constructor(®ister_mutex); - * but other times because we do a fake parameter assignement or + * but other times because we do a fake parameter assignment or * something the assignment is more direct: * scope = ®ister_mutex; * diff --git a/smatch_math.c b/smatch_math.c index c5e46bfe..fa824fe8 100644 --- a/smatch_math.c +++ b/smatch_math.c @@ -339,7 +339,7 @@ static bool handle_container_of(struct expression *expr, int implied, int *recur * p = container_of(foo, struct my_struct, member); * Then if the offset is non-zero we can assume that p is a valid * pointer. Mathematically, that's not necessarily true, but in - * pratical terms if p isn't valid then we're already in deep trouble + * practical terms if p isn't valid then we're already in deep trouble * to the point where printing more warnings now won't help. * * There are places were the author knows that container_of() is a diff --git a/smatch_param_compare_limit.c b/smatch_param_compare_limit.c index a1c4cef3..99bb1cae 100644 --- a/smatch_param_compare_limit.c +++ b/smatch_param_compare_limit.c @@ -119,7 +119,7 @@ static void add_comparison_limit_var_sym(const char *left_name, } /* - * This is quite a bit more limitted, less ambitious, simpler compared to + * This is quite a bit more limited, less ambitious, simpler compared to * smatch_camparison.c. */ void __compare_param_limit_hook(struct expression *left_expr, struct expression *right_expr, diff --git a/smatch_parsed_conditions.c b/smatch_parsed_conditions.c index 338d2a26..afa5c455 100644 --- a/smatch_parsed_conditions.c +++ b/smatch_parsed_conditions.c @@ -30,7 +30,7 @@ * implications. * * So what this module does is it ties the implications to the expression - * pointer so that we can retreive them easily. It's similar to Smatch stored + * pointer so that we can retrieve them easily. It's similar to Smatch stored * implications but it doesn't save condition, it saves the pointer. * * We ignore pre loop conditions which Smatch parses twice. diff --git a/smatch_ssa.c b/smatch_ssa.c index 37365558..f643bac3 100644 --- a/smatch_ssa.c +++ b/smatch_ssa.c @@ -151,7 +151,7 @@ static void match_assign(struct expression *expr) if (!orig || orig->state == &undefined) orig = set_state(my_id, right_name, right_sym, alloc_ssa_new(right_name)); - /* This can happen in unreachable code or outside of functions I gess */ + /* This can happen in unreachable code or outside of functions I guess */ if (!orig) return; diff --git a/smatch_strlen.c b/smatch_strlen.c index 74c5c825..8161c638 100644 --- a/smatch_strlen.c +++ b/smatch_strlen.c @@ -415,7 +415,7 @@ void register_strlen(int id) add_function_hook("strcpy", &match_strcpy, NULL); /* * I would have made strchr only apply for success returns but some - * arches (arm64) impliment strchr outside the kernel so we don't know + * arches (arm64) implement strchr outside the kernel so we don't know * the return values. Having a NULL with a strlen is fine because if * someone uses the NULL then we're already in trouble. */ diff --git a/smatch_struct_assignment.c b/smatch_struct_assignment.c index 99f2b85c..0e3cf899 100644 --- a/smatch_struct_assignment.c +++ b/smatch_struct_assignment.c @@ -50,7 +50,7 @@ * p1->x->y. * * I don't have a proper solution for this problem right now. I just copy one - * level and don't nest. It should handle limitted nesting but intelligently. + * level and don't nest. It should handle limited nesting but intelligently. * * The other thing is that you end up with a lot of garbage assignments where * we record "x could be anything. x->y could be anything. x->y->z->a->b->c -- 2.39.5