From: Kamalesh Babulal Date: Wed, 2 Oct 2024 07:08:42 +0000 (+0530) Subject: api.c: constify cgroup_get_threads() arguments X-Git-Tag: v3.2.0~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c32ab906cf7039eae81220eb6a7e2e78a13f798d;p=thirdparty%2Flibcgroup.git api.c: constify cgroup_get_threads() arguments Constify the char* functional arguments of cgroup_get_threads(), these parameters are not supposed to changed. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- diff --git a/include/libcgroup/groups.h b/include/libcgroup/groups.h index 2def31c2..fb8159a1 100644 --- a/include/libcgroup/groups.h +++ b/include/libcgroup/groups.h @@ -597,7 +597,7 @@ int cgroup_get_procs(const char *name, const char *controller, pid_t **pids, int * 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_threads(char *name, char *controller, pid_t **pids, int *size); +int cgroup_get_threads(const char *name, const char *controller, pid_t **pids, int *size); /** * Change permission of files and directories of given group diff --git a/src/api.c b/src/api.c index 18a48367..39eccdd7 100644 --- a/src/api.c +++ b/src/api.c @@ -6250,7 +6250,7 @@ int cgroup_get_procs(const char *name, const char *controller, pid_t **pids, int return read_pids(cgroup_path, pids, size); } -int cgroup_get_threads(char *name, char *controller, pid_t **pids, int *size) +int cgroup_get_threads(const char *name, const char *controller, pid_t **pids, int *size) { char cgroup_path[FILENAME_MAX];