aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-09-23 16:01:09 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-09-23 16:01:09 +0000
commitc290563319b61c8230deca52ab625d8dc335e2d3 (patch)
tree0961ae48901bd3defbcc6bbd5cd57bd90a3f849e /miscutils
parentc1876d7364a260e06cd23a3255b9058240527b02 (diff)
downloadbusybox-c290563319b61c8230deca52ab625d8dc335e2d3.tar.gz
remove unneeded #includes, fix indentation
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/runlevel.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c
index a042a7012..91d49fa55 100644
--- a/miscutils/runlevel.c
+++ b/miscutils/runlevel.c
@@ -20,24 +20,23 @@
int runlevel_main(int argc, char *argv[])
{
- struct utmp *ut;
- char prev;
+ struct utmp *ut;
+ char prev;
- if (argc > 1) utmpname(argv[1]);
+ if (argc > 1) utmpname(argv[1]);
- setutent();
- while ((ut = getutent()) != NULL) {
- if (ut->ut_type == RUN_LVL) {
- prev = ut->ut_pid / 256;
- if (prev == 0) prev = 'N';
- printf("%c %c\n", prev, ut->ut_pid % 256);
- endutent();
- return (0);
+ setutent();
+ while ((ut = getutent()) != NULL) {
+ if (ut->ut_type == RUN_LVL) {
+ prev = ut->ut_pid / 256;
+ if (prev == 0) prev = 'N';
+ printf("%c %c\n", prev, ut->ut_pid % 256);
+ endutent();
+ return 0;
+ }
}
- }
- printf("unknown\n");
- endutent();
- return (1);
+ puts("unknown");
+ endutent();
+ return 1;
}
-