function_ptr: handle scope of function pointers better
commit66edd7efed6caa399deb4bef139a4140ca105f2a
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 5 Jul 2013 08:41:30 +0000 (5 11:41 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 5 Jul 2013 08:41:30 +0000 (5 11:41 +0300)
tree6ef4c7ddae18e190d84776b9afd2684296695ca2
parent05761776165109a8bd8e471edb96fa01b1020413
function_ptr: handle scope of function pointers better

What happened was that you had a lot of functions which did:

fn = SHOULD_WRITE ? write : read;
fn(foo, bar, baz);

"fn" is a very common name.  All those function calls got jumbled together
as if they were calling the same function.  And also if there were actually
a function called "fn", then it thought it was being called as well.

In the new code we say that it is "outside_func ptr fn" being called
instead of just "fn".  This way they don't get mixed up.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_function_ptrs.c