string_len: export get_formatted_string_size()
commit06998b4cbfaae9cbd4df990f19c1351c653c40ea
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 23 Jan 2014 17:32:15 +0000 (23 20:32 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 23 Jan 2014 17:32:15 +0000 (23 20:32 +0300)
tree748deee222e69b85ed21ada356b20ddfc10f9647
parent3209d0c3957aeb46f067e77514ae3913a5e4ecea
string_len: export get_formatted_string_size()

You pass this a function call and a parameter number like this:

snprintf(buf, sizeof(buf), "%d %d %d\n", a, b, c);

The call is snprintf and the parameter with the string is 2.  It tells you
the max length of the string (including the NUL char, unfortunately.
Maybe that should change in the future).

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