From: Jan Safranek Date: Wed, 24 Aug 2011 09:39:51 +0000 (+0200) Subject: lssubsys: remove unused variable X-Git-Tag: v0.38~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f0b52ad5a3f893cea736da97fed37090a91ea82;p=thirdparty%2Flibcgroup.git lssubsys: remove unused variable Remove one unused variable and add more descriptive comment. Signed-off-by: Jan Safranek Acked-by: Dhaval Giani --- 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)) {