summaryrefslogtreecommitdiff
path: root/slstatus.c
diff options
context:
space:
mode:
authorAaron Marcher <info@nulltime.net>2017-04-20 22:18:24 +0200
committerAaron Marcher <info@nulltime.net>2017-04-20 22:18:24 +0200
commitb2714032e5087e63b5744d3fb8a131e13e1d6f9a (patch)
treebead380603e1d9aec576e76f9a83e2db86408434 /slstatus.c
parent95ceafcae7fbd244c3226bb97db37a7a99877d55 (diff)
username(): get rid of unneeded uid variable
Diffstat (limited to 'slstatus.c')
-rw-r--r--slstatus.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/slstatus.c b/slstatus.c
index ada6441..5500a62 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -643,8 +643,7 @@ uptime(void)
static char *
username(void)
{
- uid_t uid = geteuid();
- struct passwd *pw = getpwuid(uid);
+ struct passwd *pw = getpwuid(geteuid());
if (pw == NULL) {
warn("Failed to get username");