From c290563319b61c8230deca52ab625d8dc335e2d3 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 23 Sep 2006 16:01:09 +0000 Subject: remove unneeded #includes, fix indentation --- miscutils/runlevel.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'miscutils') diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index a042a70..91d49fa 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; } - -- cgit v1.1