]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
lssubsys: remove unused variable
authorJan Safranek <jsafrane@redhat.com>
Wed, 24 Aug 2011 09:39:51 +0000 (11:39 +0200)
committerJan Safranek <jsafrane@redhat.com>
Wed, 14 Sep 2011 11:21:13 +0000 (13:21 +0200)
Remove one unused variable and add more descriptive comment.

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
src/tools/lssubsys.c

index c27169f4a1fd01bffbc2f844606303e2f90de2fd..28ef4560ecac7d71dc1221d5b0b904e56d066413 100644 (file)
@@ -102,17 +102,12 @@ static int print_all_controllers_in_hierarchy(const char *tname,
        int first = 1;
        cont_name_t cont_names;
        cont_name_t cont_name;
-       int init = 1;
-
-       /* initialize libcgroup */
-       ret = cgroup_init();
-       if (ret) {
-               /*
-                * if the group is not initialised we assume
-                * no mount points are available
-                */
-               init = 0;
-       }
+
+       /*
+        * Initialize libcgroup and intentionally ignore its result,
+        * no mounted controller is valid use case.
+        */
+       (void) cgroup_init();
 
        ret = cgroup_get_all_controller_begin(&handle, &info);
        if ((ret != 0) && (ret != ECGEOF)) {