user_data: fix returned user data from a parameter
One of the validation tests has:
struct my_struct *returns_filter(struct my_struct *p)
{
return p;
}
The problem is that both $->x it user data for both param 0 and the
returned value (param -1). The way that this function was handled
changed in commit
71ff19ead91c ("db: prefer storing param data over return
data"). Originally Smatch recorded that -1 was user data but now it
records that 0 is user data. (It doesn't actually record anything because
it was user data to begin with).
Fortunately if a function returns a parameter, that's recorded and
generates a fake assignment which will set the right stuff to user data.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>