aboutsummaryrefslogtreecommitdiff
path: root/logname.c
diff options
context:
space:
mode:
Diffstat (limited to 'logname.c')
-rw-r--r--logname.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/logname.c b/logname.c
index 1fc518bfc..d614e85f1 100644
--- a/logname.c
+++ b/logname.c
@@ -25,13 +25,13 @@
extern int logname_main(int argc, char **argv)
{
- char *user = xmalloc(9);
+ char user[9];
if (argc > 1)
usage(logname_usage);
my_getpwuid(user, geteuid());
- if (user) {
+ if (*user) {
puts(user);
return EXIT_SUCCESS;
}