Originally this issue got reported on tools/cgset and since tools/cgxset
borrows most of the code from cgset, fix the issue here too. The
original warning (cgset):
CID
1488715 (#1 of 1): Uninitialized scalar variable (UNINIT).
uninit_use_in_call: Using uninitialized value *src_cg_path as
argument to %s when calling fprintf.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
int nv_max = 0;
struct cgroup *converted_src_cgroup;
- char src_cg_path[FILENAME_MAX];
+ char src_cg_path[FILENAME_MAX] = "\0";
struct cgroup *src_cgroup;
struct cgroup *cgroup;