Ver Fonte

username(): get rid of unneeded uid variable

Aaron Marcher há 8 anos atrás
pai
commit
b2714032e5
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      slstatus.c

+ 1 - 2
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");