diff options
Diffstat (limited to 'coreutils/whoami.c')
-rw-r--r-- | coreutils/whoami.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/coreutils/whoami.c b/coreutils/whoami.c index 3185817b6..25757f633 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c | |||
@@ -9,11 +9,10 @@ | |||
9 | 9 | ||
10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ | 10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ |
11 | 11 | ||
12 | #include <stdio.h> | ||
13 | #include <stdlib.h> | ||
14 | #include <unistd.h> | ||
15 | #include "busybox.h" | 12 | #include "busybox.h" |
16 | 13 | ||
14 | /* This is a NOFORK applet. Be very careful! */ | ||
15 | |||
17 | int whoami_main(int argc, char **argv); | 16 | int whoami_main(int argc, char **argv); |
18 | int whoami_main(int argc, char **argv) | 17 | int whoami_main(int argc, char **argv) |
19 | { | 18 | { |
@@ -21,6 +20,6 @@ int whoami_main(int argc, char **argv) | |||
21 | bb_show_usage(); | 20 | bb_show_usage(); |
22 | 21 | ||
23 | puts(bb_getpwuid(NULL, geteuid(), -1)); | 22 | puts(bb_getpwuid(NULL, geteuid(), -1)); |
24 | /* exits on error */ | 23 | |
25 | fflush_stdout_and_exit(EXIT_SUCCESS); | 24 | return fflush(stdout); |
26 | } | 25 | } |