From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 25475138306 for ; Thu, 14 Jul 2016 17:25:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4F6A321C10A; Thu, 14 Jul 2016 17:25:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D00F121C10A for ; Thu, 14 Jul 2016 17:25:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F419E340B9C for ; Thu, 14 Jul 2016 17:25:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D69402424 for ; Thu, 14 Jul 2016 17:25:34 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1468516397.20035210bdf5d5729734457f35f5f32a53a5b3ad.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/rc-status.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 20035210bdf5d5729734457f35f5f32a53a5b3ad X-VCS-Branch: master Date: Thu, 14 Jul 2016 17:25:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 76829cfd-9327-4754-88a3-7cb70f871f2f X-Archives-Hash: bcc67a916930cbfc0e94bf9a0676eef1 commit: 20035210bdf5d5729734457f35f5f32a53a5b3ad Author: William Hubbs gmail com> AuthorDate: Thu Jul 14 17:13:17 2016 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Jul 14 17:13:17 2016 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=20035210 make variable aflag a boolean show_all src/rc/rc-status.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c index 5018662..a0a2fce 100644 --- a/src/rc/rc-status.c +++ b/src/rc/rc-status.c @@ -176,9 +176,9 @@ print_stacked_services(const char *runlevel) int main(int argc, char **argv) { RC_STRING *s, *l, *t, *level; - + bool show_all = false; char *p, *runlevel = NULL; - int opt, aflag = 0, retval = 0; + int opt, retval = 0; test_crashed = _rc_can_find_pids(); @@ -187,7 +187,7 @@ int main(int argc, char **argv) (int *) 0)) != -1) switch (opt) { case 'a': - aflag++; + show_all = true; levels = rc_runlevel_list(); break; case 'c': @@ -265,7 +265,7 @@ int main(int argc, char **argv) services = NULL; } - if (aflag || argc < 2) { + if (show_all || argc < 2) { /* Show hotplugged services */ print_level("Dynamic", "hotplugged"); services = rc_services_in_state(RC_SERVICE_HOTPLUGGED); @@ -274,7 +274,7 @@ int main(int argc, char **argv) services = NULL; /* Show manually started and unassigned depended services */ - if (aflag) { + if (show_all) { rc_stringlist_free(levels); levels = rc_stringlist_new(); if (!runlevel)