Remove one unused variable and add more descriptive comment.

Signed-off-by: Jan Safranek <jsafr...@redhat.com>
---

 src/tools/lssubsys.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/tools/lssubsys.c b/src/tools/lssubsys.c
index c27169f..28ef456 100644
--- a/src/tools/lssubsys.c
+++ b/src/tools/lssubsys.c
@@ -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)) {


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to