diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-03-24 19:06:49 +0100 |
---|---|---|
committer | Dhaval Giani <dhaval.giani@gmail.com> | 2010-03-26 12:56:43 +0100 |
commit | 127da29e9ab20a3be8096cbd7f7ff225a2ddd7b7 (patch) | |
tree | c06b98c7ddd7bd922cd049e4431872e6b6023f2e /include/libcgroup/iterators.h | |
parent | bdc36c15b77dd7db3720540efbd164899bee53c0 (diff) | |
download | libcg-127da29e9ab20a3be8096cbd7f7ff225a2ddd7b7.tar.gz libcg-127da29e9ab20a3be8096cbd7f7ff225a2ddd7b7.tar.xz libcg-127da29e9ab20a3be8096cbd7f7ff225a2ddd7b7.zip |
add const where applicable, drop const where unnecessary
This patch adds the const qualifier to a number of function arguments
(mostly string arguments) so that client libraries can pass their own
const strings to the library without having to cast their const'ness
away.
This also drops a couple of consts where call-by-value is done anyway,
and which hence has no effect and just misleads the users and adds
unnecessary noise to the signal. After all this is C, not C++.
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
Diffstat (limited to 'include/libcgroup/iterators.h')
-rw-r--r-- | include/libcgroup/iterators.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/libcgroup/iterators.h b/include/libcgroup/iterators.h index 3e9f9f7..e8df12a 100644 --- a/include/libcgroup/iterators.h +++ b/include/libcgroup/iterators.h @@ -74,7 +74,7 @@ struct controller_data { * @handle: Handle to be used during iteration * @info: info filled and returned about directory information */ -int cgroup_walk_tree_begin(char *controller, char *base_path, const int depth, +int cgroup_walk_tree_begin(const char *controller, const char *base_path, int depth, void **handle, struct cgroup_file_info *info, int *base_level); /** @@ -86,7 +86,7 @@ int cgroup_walk_tree_begin(char *controller, char *base_path, const int depth, * * Returns ECGEOF when we are done walking through the nodes. */ -int cgroup_walk_tree_next(const int depth, void **handle, +int cgroup_walk_tree_next(int depth, void **handle, struct cgroup_file_info *info, int base_level); int cgroup_walk_tree_end(void **handle); @@ -107,7 +107,7 @@ int cgroup_walk_tree_set_flags(void **handle, int flags); * @handle: Handle to be used during iteration. * @stat: Stats values will be filled and returned here. */ -int cgroup_read_stats_begin(char *controller, char *path, void **handle, +int cgroup_read_stats_begin(const char *controller, const char *path, void **handle, struct cgroup_stat *stat); /** @@ -126,7 +126,7 @@ int cgroup_read_stats_end(void **handle); * @handle: Handle to be used in the iteration * @pid: The pid read from the tasks file. Will be filled in by the API */ -int cgroup_get_task_begin(char *cgroup, char *controller, void **handle, +int cgroup_get_task_begin(const char *cgroup, const char *controller, void **handle, pid_t *pid); /** |