diff options
Diffstat (limited to 'coreutils/logname.c')
-rw-r--r-- | coreutils/logname.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/coreutils/logname.c b/coreutils/logname.c index 0924b2471..3e10fba6f 100644 --- a/coreutils/logname.c +++ b/coreutils/logname.c | |||
@@ -32,8 +32,7 @@ extern int logname_main(int argc, char **argv) | |||
32 | if (argc > 1) | 32 | if (argc > 1) |
33 | show_usage(); | 33 | show_usage(); |
34 | 34 | ||
35 | my_getpwuid(user, geteuid()); | 35 | if (my_getpwuid(user, geteuid())) { |
36 | if (*user) { | ||
37 | puts(user); | 36 | puts(user); |
38 | return EXIT_SUCCESS; | 37 | return EXIT_SUCCESS; |
39 | } | 38 | } |