all repos — slstatus @ 56fffbce64e2ee66891dbe3f2b8b9b4f9cb284bc

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

improved hostname()
Ali H. Fardan raiz@firemail.cc
Wed, 14 Sep 2016 12:22:03 +0300
commit

56fffbce64e2ee66891dbe3f2b8b9b4f9cb284bc

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