all repos — slstatus @ 3bfc3bbcae41c58cc527ee074468afc83ef1a9ab

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

strtok() has no effect on buf && fgets() should have the full buffer length
raiz raiz@firemail.cc
Tue, 27 Dec 2016 18:54:16 +0300
commit

3bfc3bbcae41c58cc527ee074468afc83ef1a9ab

parent

f62d626d9b7958362fcf3605bcd2280295c0a30c

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

jump to
M slstatus.cslstatus.c

@@ -413,11 +413,10 @@ if (fp == NULL) {

warn("Failed to get command output for %s", cmd); return smprintf(UNKNOWN_STR); } - fgets(buf, sizeof(buf)-1, fp); + fgets(buf, sizeof(buf), fp); pclose(fp); buf[strlen(buf)] = '\0'; - strtok(buf, "\n"); return smprintf("%s", buf); }