smatch_expressions: rename deref_expression() to member_expression()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 23 Jan 2013 10:42:47 +0000 (23 13:42 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 23 Jan 2013 10:42:47 +0000 (23 13:42 +0300)
It is used to create a struct which points to a struct member.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_expressions.c
smatch_extra.h
smatch_flow.c

index a5de4b8..8c56e13 100644 (file)
@@ -26,7 +26,7 @@ struct expression *value_expr(long long val)
        return expr;
 }
 
-struct expression *deref_expression(struct expression *deref, int op, struct ident *member)
+struct expression *member_expression(struct expression *deref, int op, struct ident *member)
 {
        struct expression *expr;
 
index 2400aa7..c77f77b 100644 (file)
@@ -142,7 +142,7 @@ void function_comparison(int comparison, struct expression *expr, sval_t sval, i
 /* smatch_expressions.c */
 struct expression *zero_expr();
 struct expression *value_expr(long long val);
-struct expression *deref_expression(struct expression *deref, int op, struct ident *member);
+struct expression *member_expression(struct expression *deref, int op, struct ident *member);
 struct expression *assign_expression(struct expression *left, struct expression *right);
 struct expression *symbol_expression(struct symbol *sym);
 
index 0e8b644..26cb5d8 100644 (file)
@@ -740,7 +740,7 @@ static void fake_member_assigns(struct symbol *sym)
        FOR_EACH_PTR(sym->initializer->expr_list, tmp) {
                if (tmp->type != EXPR_IDENTIFIER) /* how to handle arrays?? */
                        continue;
-               deref = deref_expression(symbol, '.', tmp->expr_ident);
+               deref = member_expression(symbol, '.', tmp->expr_ident);
                assign = assign_expression(deref, tmp->ident_expression);
                __split_expr(assign);
        } END_FOR_EACH_PTR(tmp);
@@ -789,7 +789,7 @@ static void fake_global_assign(struct symbol *sym)
                FOR_EACH_PTR(sym->initializer->expr_list, tmp) {
                        if (tmp->type != EXPR_IDENTIFIER) /* how to handle arrays?? */
                                continue;
-                       deref = deref_expression(symbol, '.', tmp->expr_ident);
+                       deref = member_expression(symbol, '.', tmp->expr_ident);
                        assign = assign_expression(deref, tmp->ident_expression);
                        __pass_to_client(assign, GLOBAL_ASSIGNMENT_HOOK);
                } END_FOR_EACH_PTR(tmp);