all repos — slstatus @ 5609b9d9dec24b8771280e9eace955fe17663236

my build of slstatus (tools.suckless.org/slstatus/)

Merge pull request #17 from R41z/master

improved hostname()
Aaron Marcher info@nulltime.net
Wed, 14 Sep 2016 11:27:19 +0200
commit

5609b9d9dec24b8771280e9eace955fe17663236

parent

6edc959933cc0a8c94ed4571bf668a5fe15ba7aa

1 files changed, 1 insertions(+), 3 deletions(-)

jump to
M slstatus.cslstatus.c

@@ -272,9 +272,7 @@ return smprintf(UNKNOWN_STR);

} 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);