From 80e9084d3e7be7fbec1ed72f90b88c7626fb93d1 Mon Sep 17 00:00:00 2001 From: Dhaval Giani Date: Thu, 18 Jun 2009 19:42:47 +0530 Subject: libcgroup: Use double pointers everywhere in the get_task APIs As Jan Safranek pointed out, it is better to have double pointers everywhere in the get_task API to keep consistency. Do the same. Signed-off-by: Dhaval Giani Acked-by: Balbir Singh --- src/api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/api.c') diff --git a/src/api.c b/src/api.c index 2facfc8..ab35ed7 100644 --- a/src/api.c +++ b/src/api.c @@ -2487,7 +2487,7 @@ int cgroup_get_task_end(void **handle) return 0; } -int cgroup_get_task_next(void *handle, pid_t *pid) +int cgroup_get_task_next(void **handle, pid_t *pid) { int ret; @@ -2497,7 +2497,7 @@ int cgroup_get_task_next(void *handle, pid_t *pid) if (!handle) return ECGINVAL; - ret = fscanf((FILE *) handle, "%u", pid); + ret = fscanf((FILE *) *handle, "%u", pid); if (ret != 1) { if (ret == EOF) @@ -2536,7 +2536,7 @@ int cgroup_get_task_begin(char *cgroup, char *controller, void **handle, last_errno = errno; return ECGOTHER; } - ret = cgroup_get_task_next(*handle, pid); + ret = cgroup_get_task_next(handle, pid); return ret; } -- cgit