From: Dan Carpenter Date: Fri, 14 Dec 2012 12:08:11 +0000 (+0300) Subject: extra: fix a bug in how pointers are set inside called functions X-Git-Tag: 1.57~117 X-Git-Url: https://repo.or.cz/w/smatch.git/commitdiff_plain/07a68a68e8ad276644d7ae416a127649465c6c48 extra: fix a bug in how pointers are set inside called functions This probably should be fixed on the --info side... Ignore foo.bar modifications and only look at foo->bar changes. Signed-off-by: Dan Carpenter --- diff --git a/smatch_extra.c b/smatch_extra.c index aa3f5e15..9529db72 100644 --- a/smatch_extra.c +++ b/smatch_extra.c @@ -1085,8 +1085,8 @@ static void print_return_value_param(int return_id, char *return_ranges, struct if (strcmp(sm->name, param_name) == 0) continue; - - if (strncmp(sm->name, param_name, name_len) == 0) { + if (sm->name[name_len] == '-' && + strncmp(sm->name, param_name, name_len) == 0) { sm_msg("info: return_value_param %d %d '%s' '$$%s' '%s' %s", return_id, param, return_ranges, sm->name + name_len, sm->state->name, global_static());