Skip to content

Commit 5e24569

Browse files
author
Dan Carpenter
committed
struct_assignment: remove bogus deref_expression()
Originally this handled both "ptr = ptr" and "struct = struct", but now it converts "ptr = ptr" to struct = struct. The is_pointer() check was left over from the old code and can be deleted. I noticed this bug during review. It's possible the bug fix has some small effect on run time. Signed-off-by: Dan Carpenter <[email protected]>
1 parent 1dfa329 commit 5e24569

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

smatch_struct_assignment.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ static struct expression *get_right_base_expr(struct symbol *left_type, struct e
104104
if (right->type == EXPR_CALL)
105105
return NULL;
106106

107-
if (is_pointer(right))
108-
right = deref_expression(right);
109-
110107
return right;
111108
}
112109

0 commit comments

Comments
 (0)