Xinqi Bao's Git
projects
/
slstatus.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
| inline |
side by side
(parent:
95ceafc
)
username(): get rid of unneeded uid variable
author
Aaron Marcher <
[email protected]
>
Thu, 20 Apr 2017 20:18:24 +0000
(22:18 +0200)
committer
Aaron Marcher <
[email protected]
>
Thu, 20 Apr 2017 20:18:24 +0000
(22:18 +0200)
slstatus.c
diff
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index
ada6441
..
5500a62
100644
(file)
--- a/
slstatus.c
+++ b/
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");