Fix the following incompatible pointer warning:

api.c: In function ‘cgroup_delete_cgroup_ext’:
api.c:2888:24: warning: passing argument 4 of
‘cgroup_build_tasks_procs_path’ from incompatible pointer type
[-Wincompatible-pointer-types]
 2888 |      cgroup->controller[i]);
      |      ~~~~~~~~~~~~~~~~~~^~~
      |                        |
      |                        struct cgroup_controller *

Signed-off-by: Tom Hromatka <tom.hroma...@oracle.com>
---
 src/api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api.c b/src/api.c
index 4de07f39bd68..a6f4e46b673a 100644
--- a/src/api.c
+++ b/src/api.c
@@ -2885,7 +2885,7 @@ int cgroup_delete_cgroup_ext(struct cgroup *cgroup, int 
flags)
                        /* tasks need to be moved, pre-open target tasks file */
                        ret = cgroup_build_tasks_procs_path(parent_path,
                                        sizeof(parent_path), parent_name,
-                                       cgroup->controller[i]);
+                                       cgroup->controller[i]->name);
                        if (ret != 0) {
                                if (first_error == 0)
                                        first_error = ECGFAIL;
-- 
2.26.2



_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to