extra: fix a bug in how pointers are set inside called functions
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Dec 2012 12:08:11 +0000 (14 15:08 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Dec 2012 12:08:11 +0000 (14 15:08 +0300)
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 <dan.carpenter@oracle.com>
smatch_extra.c

index aa3f5e1..9529db7 100644 (file)
@@ -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());