username(): get rid of unneeded uid variable

This commit is contained in:
Aaron Marcher
2017-04-20 22:18:24 +02:00
parent 95ceafcae7
commit b2714032e5

View File

@ -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");