From 9f0b52ad5a3f893cea736da97fed37090a91ea82 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Wed, 24 Aug 2011 11:39:51 +0200 Subject: [PATCH] lssubsys: remove unused variable Remove one unused variable and add more descriptive comment. Signed-off-by: Jan Safranek Acked-by: Dhaval Giani --- src/tools/lssubsys.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/tools/lssubsys.c b/src/tools/lssubsys.c index c27169f4..28ef4560 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)) { -- 2.47.2