Constify the char* functional arguments of cgroup_get_procs(), these
parameters are not supposed to changed.
Fixes: https://github.com/libcgroup/libcgroup/issues/445
Reported-by: Dan Dedrick <dan.dedrick@gmail.com>
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
* to the API. Should be freed by the caller using free.
* @param size The size of the pids array returned by the API.
*/
-int cgroup_get_procs(char *name, char *controller, pid_t **pids, int *size);
+int cgroup_get_procs(const char *name, const char *controller, pid_t **pids, int *size);
/**
* Get the list of threads in a cgroup. This list is guaranteed to
return 0;
}
-int cgroup_get_procs(char *name, char *controller, pid_t **pids, int *size)
+int cgroup_get_procs(const char *name, const char *controller, pid_t **pids, int *size)
{
char cgroup_path[FILENAME_MAX];