src/api.c: fix TOCTOU in cg_get_procname_from_proc_cmdline()
Fix a TOCTOU issue, reported by Coverity tool:
CID 258283 (#1 of 1): Time of check time of use (TOCTOU)1.
fs_check_call: Calling function readlink to perform check on path
Coverity gets confused when a char array is re-used for constructing
different paths and complains about TOCTOU for unrelated paths, fix it
by using different char arrays for different path, as a side effect it
also improves the readability of the code.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com> Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>