Browse Source

username(): get rid of unneeded uid variable

Aaron Marcher 8 years ago
parent
commit
b2714032e5
1 changed files with 1 additions and 2 deletions
  1. 1 2
      slstatus.c

+ 1 - 2
slstatus.c

@@ -643,8 +643,7 @@ uptime(void)
 static char *
 static char *
 username(void)
 username(void)
 {
 {
-	uid_t uid = geteuid();
-	struct passwd *pw = getpwuid(uid);
+	struct passwd *pw = getpwuid(geteuid());
 
 
 	if (pw == NULL) {
 	if (pw == NULL) {
 		warn("Failed to get username");
 		warn("Failed to get username");