username(): get rid of unneeded uid variable
This commit is contained in:
parent
95ceafcae7
commit
b2714032e5
|
@ -643,8 +643,7 @@ uptime(void)
|
||||||
static char *
|
static char *
|
||||||
username(void)
|
username(void)
|
||||||
{
|
{
|
||||||
uid_t uid = geteuid();
|
struct passwd *pw = getpwuid(geteuid());
|
||||||
struct passwd *pw = getpwuid(uid);
|
|
||||||
|
|
||||||
if (pw == NULL) {
|
if (pw == NULL) {
|
||||||
warn("Failed to get username");
|
warn("Failed to get username");
|
||||||
|
|
Loading…
Reference in New Issue