aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-03-18 15:41:31 (GMT)
committerDan Carpenter <dan.carpenter@oracle.com>2019-03-18 15:41:31 (GMT)
commit10ef4ac47941c9619179a2540c3f2fac7c6c0f66 (patch)
tree42f9e1177d9dfc93927bf4c9bcae486ed4332b3f
parent69885220072b3a52a68fb2d4a56e17663a82125e (diff)
mtag: delete unused get_mtag() function
I've removed all the callers so now I can remove the get_mtag() function. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
-rw-r--r--smatch.h1
-rw-r--r--smatch_mtag.c34
2 files changed, 0 insertions, 35 deletions
diff --git a/smatch.h b/smatch.h
index 371593d..c869980 100644
--- a/smatch.h
+++ b/smatch.h
@@ -1213,7 +1213,6 @@ char *get_container_name(struct expression *container, struct expression *expr);
/* smatch_mtag.c */
int get_string_mtag(struct expression *expr, mtag_t *tag);
int get_toplevel_mtag(struct symbol *sym, mtag_t *tag);
-int get_mtag(struct expression *expr, mtag_t *tag);
int create_mtag_alias(mtag_t tag, struct expression *expr, mtag_t *new);
int expr_to_mtag_offset(struct expression *expr, mtag_t *tag, int *offset);
void update_mtag_data(struct expression *expr);
diff --git a/smatch_mtag.c b/smatch_mtag.c
index 0d8bb21..fd2d909 100644
--- a/smatch_mtag.c
+++ b/smatch_mtag.c
@@ -242,40 +242,6 @@ static int get_implied_mtag_offset(struct expression *expr, mtag_t *tag, int *of
return 1;
}
-static int get_mtag_cnt;
-int get_mtag(struct expression *expr, mtag_t *tag)
-{
- int ret = 0;
-
- expr = strip_expr(expr);
- if (!expr)
- return 0;
-
- if (get_mtag_cnt > 0)
- return 0;
-
- get_mtag_cnt++;
-
- switch (expr->type) {
- case EXPR_STRING:
- if (get_string_mtag(expr, tag)) {
- ret = 1;
- goto dec_cnt;
- }
- break;
- case EXPR_SYMBOL:
- if (get_toplevel_mtag(expr->symbol, tag)) {
- ret = 1;
- goto dec_cnt;
- }
- break;
- }
-
-dec_cnt:
- get_mtag_cnt--;
- return ret;
-}
-
struct range_list *swap_mtag_seed(struct expression *expr, struct range_list *rl)
{
char buf[256];

Privacy Policy