slstatus

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.beauhilton.com/slstatus.git
Log | Files | Refs | README | LICENSE

commit 545f1560e6b019a49f9df7f7f16e861b58ce51f4
parent 98f3985d3ee542fe98b8182ed8f4ced632032b31
Author: Aaron Marcher <info@nulltime.net>
Date:   Fri,  9 Sep 2016 19:19:46 +0200

fixed username function (wtf happened here?)

Diffstat:
Mslstatus.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/slstatus.c b/slstatus.c @@ -455,11 +455,12 @@ username(void) uid_t uid = geteuid(); struct passwd *pw = getpwuid(uid); - if (pw == NULL) - return smprintf("%s", pw->pw_name); + if (pw == NULL) { + warn("Could not get username"); + return smprintf(UNKNOWN_STR); + } - warn("Could not get username"); - return smprintf(UNKNOWN_STR); + return smprintf("%s", pw->pw_name); } static char *