summaryrefslogtreecommitdiff
path: root/coreutils/whoami.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/whoami.c')
-rw-r--r--coreutils/whoami.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index c3b1140..a9d6ecf 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -35,8 +35,7 @@ extern int whoami_main(int argc, char **argv)
if (argc > 1)
show_usage();
- my_getpwuid(user, uid);
- if (*user) {
+ if (my_getpwuid(user, uid)) {
puts(user);
return EXIT_SUCCESS;
}