summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slstatus.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/slstatus.c b/slstatus.c
index 21cda51..73e0f2c 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -413,11 +413,10 @@ run_command(const char *cmd)
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);
}