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)) { ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel