From e49d5ecbbe51718fa925b6890a735e5937cc2aa2 Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Tue, 8 Feb 2000 19:58:47 +0000 Subject: Some formatting updates (ran the code through indent) -Erik --- coreutils/whoami.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'coreutils/whoami.c') diff --git a/coreutils/whoami.c b/coreutils/whoami.c index 7fd5d01b2..3677c2fbc 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * Mini whoami implementation for busybox * @@ -24,21 +25,25 @@ #include static const char whoami_usage[] = "whoami\n\n" -"Print the user name associated with the current effective user id.\n" -"Same as id -un.\n"; + "Print the user name associated with the current effective user id.\n" -extern int whoami_main(int argc, char **argv) { + "Same as id -un.\n"; + +extern int whoami_main(int argc, char **argv) +{ struct passwd *pw; uid_t uid; - if (argc > 1) usage (whoami_usage); + if (argc > 1) + usage(whoami_usage); - uid = geteuid (); - pw = getpwuid (uid); + uid = geteuid(); + pw = getpwuid(uid); if (pw) { - puts (pw->pw_name); - exit (TRUE); - } - fprintf (stderr, "%s: cannot find username for UID %u\n", argv[0], (unsigned) uid); - exit (FALSE); + puts(pw->pw_name); + exit(TRUE); + } + fprintf(stderr, "%s: cannot find username for UID %u\n", argv[0], + (unsigned) uid); + exit(FALSE); } -- cgit v1.2.3