ranges: rename show_ranges() to show_rl()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 14 Jan 2013 20:44:16 +0000 (14 23:44 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 14 Jan 2013 20:44:16 +0000 (14 23:44 +0300)
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
12 files changed:
check_bool_implications.c
check_db_info.c
check_debug.c
check_signed.c
smatch_db.c
smatch_estate.c
smatch_extra.c
smatch_extra.h
smatch_implied.c
smatch_param_filter.c
smatch_param_set.c
smatch_ranges.c

index 2f9d434..6c2fe70 100644 (file)
@@ -91,9 +91,9 @@ static void print_implications(struct symbol *sym, int param,
                return;
 
        sm_msg("info: bool_return_implication \"1\" %d \"%s\" %s", param,
-              show_ranges(estate_rl(true_state)), global_static());
+              show_rl(estate_rl(true_state)), global_static());
        sm_msg("info: bool_return_implication \"0\" %d \"%s\" %s", param,
-              show_ranges(estate_rl(false_state)), global_static());
+              show_rl(estate_rl(false_state)), global_static());
 }
 
 static void cleanup(void)
index 5ff1ec6..b153a4e 100644 (file)
@@ -44,7 +44,7 @@ static void match_end_func(struct symbol *sym)
        if (!return_ranges)
                return;
        sm_msg("info: function_return_values '%s' %s",
-              show_ranges(return_ranges), global_static());
+              show_rl(return_ranges), global_static());
        return_ranges = NULL;
 }
 
index 191e22d..b9fde07 100644 (file)
@@ -58,7 +58,7 @@ static void match_print_implied(const char *fn, struct expression *expr, void *i
        get_implied_rl(arg, &rl);
 
        name = expr_to_str_complex(arg);
-       sm_msg("implied: %s = '%s'", name, show_ranges(rl));
+       sm_msg("implied: %s = '%s'", name, show_rl(rl));
        free_string(name);
 }
 
index 4ed734e..c94d489 100644 (file)
@@ -271,8 +271,8 @@ static void match_condition(struct expression *expr)
                char *name = expr_to_str_complex(expr);
 
                sm_msg("warn: impossible condition '(%s) => (%s %s %s)'", name,
-                      show_ranges(rl_left), show_special(expr->op),
-                      show_ranges(rl_right));
+                      show_rl(rl_left), show_special(expr->op),
+                      show_rl(rl_right));
                free_string(name);
        }
 
@@ -280,8 +280,8 @@ static void match_condition(struct expression *expr)
                char *name = expr_to_str_complex(expr);
 
                sm_msg("warn: always true condition '(%s) => (%s %s %s)'", name,
-                      show_ranges(rl_left_orig), show_special(expr->op),
-                      show_ranges(rl_right_orig));
+                      show_rl(rl_left_orig), show_special(expr->op),
+                      show_rl(rl_right_orig));
                free_string(name);
        }
 }
index a85de1f..3970ff6 100644 (file)
@@ -582,7 +582,7 @@ static int call_return_state_hooks_split_possible(struct expression *expr)
                overwrite_states_using_pool(tmp);
 
                rl = cast_rl(cur_func_return_type(), estate_rl(tmp->state));
-               return_ranges = show_ranges(rl);
+               return_ranges = show_rl(rl);
 
                return_id++;
                slist = __get_cur_slist();
@@ -614,10 +614,10 @@ static void call_return_state_hooks(struct expression *expr)
                return;
        } else if (get_implied_rl(expr, &rl)) {
                rl = cast_rl(cur_func_return_type(), rl);
-               return_ranges = show_ranges(rl);
+               return_ranges = show_rl(rl);
        } else {
                rl = alloc_whole_rl(cur_func_return_type());
-               return_ranges = show_ranges(rl);
+               return_ranges = show_rl(rl);
        }
 
        return_id++;
index cef6dda..37afbab 100644 (file)
@@ -239,7 +239,7 @@ struct smatch_state *alloc_estate_sval(sval_t sval)
 
        state = __alloc_smatch_state(0);
        state->data = alloc_dinfo_range(sval, sval);
-       state->name = show_ranges(get_dinfo(state)->value_ranges);
+       state->name = show_rl(get_dinfo(state)->value_ranges);
        estate_set_hard_max(state);
        return state;
 }
@@ -250,7 +250,7 @@ struct smatch_state *alloc_estate_range(sval_t min, sval_t max)
 
        state = __alloc_smatch_state(0);
        state->data = alloc_dinfo_range(min, max);
-       state->name = show_ranges(get_dinfo(state)->value_ranges);
+       state->name = show_rl(get_dinfo(state)->value_ranges);
        return state;
 }
 
@@ -263,7 +263,7 @@ struct smatch_state *alloc_estate_rl(struct range_list *rl)
 
        state = __alloc_smatch_state(0);
        state->data = alloc_dinfo_range_list(rl);
-       state->name = show_ranges(rl);
+       state->name = show_rl(rl);
        return state;
 }
 
index d113102..b210c31 100644 (file)
@@ -1214,7 +1214,7 @@ static void match_call_info(struct expression *expr)
                        rl = alloc_whole_rl(type);
 
                sm_msg("info: passes param_value '%s' %d '$$' %s %s",
-                      name, i, show_ranges(rl),
+                      name, i, show_rl(rl),
                       is_static(expr->fn) ? "static" : "global");
                i++;
        } END_FOR_EACH_PTR(arg);
index d354ee7..4b95590 100644 (file)
@@ -33,7 +33,7 @@ DECLARE_ALLOCATOR(data_info);
 extern struct string_list *__ignored_macros;
 
 /* these are implemented in smatch_ranges.c */
-char *show_ranges(struct range_list *list);
+char *show_rl(struct range_list *list);
 void str_to_rl(struct symbol *type, char *value, struct range_list **rl);
 
 struct data_range *alloc_range(sval_t min, sval_t max);
index b8973a2..6ef3a79 100644 (file)
@@ -379,10 +379,10 @@ static void separate_and_filter(struct sm_state *sm_state, int comparison, struc
        if (option_debug_implied || option_debug) {
                if (lr == LEFT)
                        sm_msg("checking implications: (%s %s %s)",
-                               sm_state->name, show_special(comparison), show_ranges(vals));
+                               sm_state->name, show_special(comparison), show_rl(vals));
                else
                        sm_msg("checking implications: (%s %s %s)",
-                               show_ranges(vals), show_special(comparison), sm_state->name);
+                               show_rl(vals), show_special(comparison), sm_state->name);
        }
 
        separate_pools(sm_state, comparison, vals, lr, &true_stack, &false_stack, NULL);
index 6543b97..d86d0cc 100644 (file)
@@ -83,7 +83,7 @@ static char *get_orig_rl(struct sm_state *sm)
                }
                ret = rl_union(ret, estate_rl(extra));
        } END_FOR_EACH_PTR(tmp);
-       return show_ranges(ret);
+       return show_rl(ret);
 }
 
 static void print_one_mod_param(int return_id, char *return_ranges,
@@ -120,7 +120,7 @@ static void print_one_extra_param(int return_id, char *return_ranges,
 
        sm_msg("info: return_param_filter %d %d '%s' '%s' '%s' %s",
               return_id, param, return_ranges,
-              param_name, show_ranges(estate_rl(sm->state)), global_static());
+              param_name, show_rl(estate_rl(sm->state)), global_static());
 }
 
 static void print_return_value_param(int return_id, char *return_ranges, struct expression *expr, struct state_list *slist)
index 21c6b86..7bbc8d5 100644 (file)
@@ -83,7 +83,7 @@ static void print_return_value_param(int return_id, char *return_ranges, struct
                        continue;
                if (!sm->sym->ident)
                        continue;
-               print_one_return_value_param(return_id, return_ranges, param, sm, show_ranges(rl), slist);
+               print_one_return_value_param(return_id, return_ranges, param, sm, show_rl(rl), slist);
        } END_FOR_EACH_PTR(sm);
 }
 
index 8149541..b035ae6 100644 (file)
@@ -17,7 +17,7 @@ ALLOCATOR(data_range, "data range");
 __DO_ALLOCATOR(struct data_range, sizeof(struct data_range), __alignof__(struct data_range),
                         "permanent ranges", perm_data_range);
 
-char *show_ranges(struct range_list *list)
+char *show_rl(struct range_list *list)
 {
        struct data_range *tmp;
        char full[256];