Print this page
11506 smatch resync
@@ -50,13 +50,16 @@
{
struct smatch_state *state;
struct modification_data *data;
char *name;
- state = __alloc_smatch_state(0);
expr = strip_expr(expr);
name = expr_to_str(expr);
+ if (!name)
+ return NULL;
+
+ state = __alloc_smatch_state(0);
state->name = alloc_sname(name);
free_string(name);
data = __alloc_modification_data(0);
data->prev = prev;
@@ -176,11 +179,11 @@
__in_fake_assign++;
call_modification_hooks_name_sym(name, sym, expr, BOTH);
__in_fake_assign--;
- other_name = map_long_to_short_name_sym(name, sym, &other_sym);
+ other_name = get_other_name_sym(name, sym, &other_sym);
if (other_name) {
__in_fake_assign++;
call_modification_hooks_name_sym(other_name, other_sym, expr, BOTH);
__in_fake_assign--;
free_string(other_name);
@@ -277,10 +280,12 @@
void register_modification_hooks(int id)
{
my_id = id;
+ set_dynamic_states(my_id);
+
hooks = malloc((num_checks + 1) * sizeof(*hooks));
memset(hooks, 0, (num_checks + 1) * sizeof(*hooks));
hooks_late = malloc((num_checks + 1) * sizeof(*hooks));
memset(hooks_late, 0, (num_checks + 1) * sizeof(*hooks));