diff options
author | Aaron Marcher <info@nulltime.net> | 2017-04-20 22:14:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-20 22:14:56 +0200 |
commit | 95ceafcae7fbd244c3226bb97db37a7a99877d55 (patch) | |
tree | 59c7b103bb8200dda5fade062de850929714aabc /slstatus.c | |
parent | 1289bdb742adab134cf4874447b66ab386deb724 (diff) | |
parent | 35295f190207d9001fdcf30fe76f11434691b259 (diff) |
Merge pull request #39 from stoeckmann/fgets
On success, fgets always terminates the result.
Diffstat (limited to 'slstatus.c')
-rw-r--r-- | slstatus.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -447,7 +447,7 @@ run_command(const char *cmd) warn("Failed to get command output for %s", cmd); return smprintf("%s", UNKNOWN_STR); } - fgets(buf, sizeof(buf) - 1, fp); + fgets(buf, sizeof(buf), fp); pclose(fp); buf[sizeof(buf) - 1] = '\0'; |