From ef87dee1ca3b9899c70ad763288f31e030096491 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 11 Jan 2013 14:34:59 +0300 Subject: [PATCH] ranges: rename true_comparison_range_lr() to true_comparison_range_LR() The _LR stands for Left and Right. It is easy to get confused with _rl. Signed-off-by: Dan Carpenter --- smatch_extra.h | 8 ++++---- smatch_function_hooks.c | 8 ++++---- smatch_ranges.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/smatch_extra.h b/smatch_extra.h index 2d7b5b5a..dcddaaa3 100644 --- a/smatch_extra.h +++ b/smatch_extra.h @@ -47,17 +47,17 @@ void tack_on(struct range_list **list, struct data_range *drange); struct range_list *remove_range(struct range_list *list, sval_t min, sval_t max); int true_comparison_range(struct data_range *left, int comparison, struct data_range *right); -int true_comparison_range_lr(int comparison, struct data_range *var, struct data_range *val, int left); -int false_comparison_range_lr(int comparison, struct data_range *var, struct data_range *val, int left); +int true_comparison_range_LR(int comparison, struct data_range *var, struct data_range *val, int left); +int false_comparison_range_LR(int comparison, struct data_range *var, struct data_range *val, int left); struct data_range *alloc_range(sval_t min, sval_t max); int possibly_true(struct expression *left, int comparison, struct expression *right); int possibly_true_range_lists(struct range_list *left_ranges, int comparison, struct range_list *right_ranges); -int possibly_true_range_lists_lr(int comparison, struct range_list *a, struct range_list *b, int left); +int possibly_true_range_lists_LR(int comparison, struct range_list *a, struct range_list *b, int left); int possibly_false(struct expression *left, int comparison, struct expression *right); int possibly_false_range_lists(struct range_list *left_ranges, int comparison, struct range_list *right_ranges); -int possibly_false_range_lists_lr(int comparison, struct range_list *a, struct range_list *b, int left); +int possibly_false_range_lists_LR(int comparison, struct range_list *a, struct range_list *b, int left); int ranges_equiv(struct data_range *one, struct data_range *two); int range_lists_equiv(struct range_list *one, struct range_list *two); diff --git a/smatch_function_hooks.c b/smatch_function_hooks.c index 965b20cc..929a8a3d 100644 --- a/smatch_function_hooks.c +++ b/smatch_function_hooks.c @@ -300,7 +300,7 @@ static int call_implies_callbacks(int comparison, struct expression *expr, sval_ FOR_EACH_PTR(call_backs, tmp) { if (tmp->type != RANGED_CALL) continue; - if (!true_comparison_range_lr(comparison, tmp->range, value_range, left)) + if (!true_comparison_range_LR(comparison, tmp->range, value_range, left)) continue; (tmp->u.ranged)(fn, expr, NULL, tmp->info); } END_FOR_EACH_PTR(tmp); @@ -313,7 +313,7 @@ static int call_implies_callbacks(int comparison, struct expression *expr, sval_ FOR_EACH_PTR(call_backs, tmp) { if (tmp->type != RANGED_CALL) continue; - if (!false_comparison_range_lr(comparison, tmp->range, value_range, left)) + if (!false_comparison_range_LR(comparison, tmp->range, value_range, left)) continue; (tmp->u.ranged)(fn, expr, NULL, tmp->info); } END_FOR_EACH_PTR(tmp); @@ -360,12 +360,12 @@ static int db_compare_callback(void *unused, int argc, char **argv, char **azCol value = argv[4]; if (db_info.true_side) { - if (!possibly_true_range_lists_lr(db_info.comparison, + if (!possibly_true_range_lists_LR(db_info.comparison, ret_range, db_info.rl, db_info.left)) return 0; } else { - if (!possibly_false_range_lists_lr(db_info.comparison, + if (!possibly_false_range_lists_LR(db_info.comparison, ret_range, db_info.rl, db_info.left)) return 0; diff --git a/smatch_ranges.c b/smatch_ranges.c index cac5f4e5..2d25e12b 100644 --- a/smatch_ranges.c +++ b/smatch_ranges.c @@ -443,7 +443,7 @@ int true_comparison_range(struct data_range *left, int comparison, struct data_r return 0; } -int true_comparison_range_lr(int comparison, struct data_range *var, struct data_range *val, int left) +int true_comparison_range_LR(int comparison, struct data_range *var, struct data_range *val, int left) { if (left) return true_comparison_range(var, comparison, val); @@ -495,7 +495,7 @@ static int false_comparison_range_sval(struct data_range *left, int comparison, return 0; } -int false_comparison_range_lr(int comparison, struct data_range *var, struct data_range *val, int left) +int false_comparison_range_LR(int comparison, struct data_range *var, struct data_range *val, int left) { if (left) return false_comparison_range_sval(var, comparison, val); @@ -574,7 +574,7 @@ int possibly_false_range_lists(struct range_list *left_ranges, int comparison, s } /* FIXME: the _rl here stands for right left so really it should be _lr */ -int possibly_true_range_lists_lr(int comparison, struct range_list *a, struct range_list *b, int left) +int possibly_true_range_lists_LR(int comparison, struct range_list *a, struct range_list *b, int left) { if (left) return possibly_true_range_lists(a, comparison, b); @@ -582,7 +582,7 @@ int possibly_true_range_lists_lr(int comparison, struct range_list *a, struct ra return possibly_true_range_lists(b, comparison, a); } -int possibly_false_range_lists_lr(int comparison, struct range_list *a, struct range_list *b, int left) +int possibly_false_range_lists_LR(int comparison, struct range_list *a, struct range_list *b, int left) { if (left) return possibly_false_range_lists(a, comparison, b); -- 2.11.4.GIT