slstatus

Fork of suckless' slstatus with my personal patches
git clone https://git.instinctive.eu/slstatus.git
Log | Files | Refs | README | LICENSE

commit 5609b9d9dec24b8771280e9eace955fe17663236
parent 6edc959933cc0a8c94ed4571bf668a5fe15ba7aa
Author: Aaron Marcher <info@nulltime.net>
Date:   Wed, 14 Sep 2016 11:27:19 +0200

Merge pull request #17 from R41z/master

improved hostname()
Diffstat:
Mslstatus.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/slstatus.c b/slstatus.c @@ -272,9 +272,7 @@ hostname(void) } fgets(hostname, sizeof(hostname), fp); - /* FIXME: needs improvement */ - memset(&hostname[strlen(hostname)-1], '\0', - sizeof(hostname) - strlen(hostname)); + hostname[strlen(hostname)-1] = '\0'; fclose(fp); return smprintf("%s", hostname);