From b2714032e5087e63b5744d3fb8a131e13e1d6f9a Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Thu, 20 Apr 2017 22:18:24 +0200 Subject: username(): get rid of unneeded uid variable --- slstatus.c | 3 +-- 1 file changed, 1 insertion(+), 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"); -- cgit v1.2.3