summaryrefslogtreecommitdiffstats
path: root/tests/walk_task.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/walk_task.c')
-rw-r--r--tests/walk_task.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/walk_task.c b/tests/walk_task.c
index fb89963..42ef32d 100644
--- a/tests/walk_task.c
+++ b/tests/walk_task.c
@@ -8,7 +8,7 @@ int main(int argc, char *argv[])
{
int ret, i;
char *group = NULL;
- FILE *tasks = NULL;
+ void *handle;
if (argc < 2) {
printf("No list of groups provided\n");
@@ -26,11 +26,10 @@ int main(int argc, char *argv[])
pid_t pid;
group = strdup(argv[i]);
printf("Printing the details of groups %s\n", group);
- ret = cgroup_get_task_begin(group, "cpu", (void *) &tasks,
- &pid);
+ ret = cgroup_get_task_begin(group, "cpu", &handle, &pid);
while (!ret) {
printf("Pid is %u\n", pid);
- ret = cgroup_get_task_next((void *) tasks, &pid);
+ ret = cgroup_get_task_next(&handle, &pid);
if (ret && ret != ECGEOF) {
printf("cgroup_get_task_next failed with %s\n",
cgroup_strerror(ret));
@@ -42,7 +41,7 @@ int main(int argc, char *argv[])
}
free(group);
group = NULL;
- ret = cgroup_get_task_end((void **) &tasks);
+ ret = cgroup_get_task_end(&handle);
}
return 0;