Explorar o código

username(): get rid of unneeded uid variable

Aaron Marcher %!s(int64=9) %!d(string=hai) anos
pai
achega
b2714032e5
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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");