extra: fix and improve used_param_value_info()
I was fixing this code and I noticed that the return from the
call_is_leaf_fn() path is reversed. I'm not sure how this worked...
Re-write it to to be more readable and fix the bugs.
Functional changes:
1) Either long variables or -> -> -> variables are considered long. Btw,
40 characters is very long.
2) Consider $ and *$ before the leaf check.
3) NULL/non-NULL pointers are useless if they are a long variable. (The
reason why they would be considered useful at all is because of error
pointers)
Style changes:
1) Use get_row_count(). This is just way cleaner.
2) Rename the function to used_param_value_info().
3) Reverse the returns so it returns true for used and false for unused.
4) Change the type to bool.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>