projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc1bb3a
)
fixed run_command()
author
Aaron Marcher
<info@nulltime.net>
Mon, 10 Oct 2016 07:02:24 +0000
(09:02 +0200)
committer
Aaron Marcher
<info@nulltime.net>
Mon, 10 Oct 2016 07:02:24 +0000
(09:02 +0200)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index e7c1c3f45aed7851ab744ec0fd431a2a0f79495c..9272c5419f27bdb6a7ffa7f2c938fcc7a0d5abfc 100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-407,8
+407,8
@@
run_command(const char *cmd)
warn("Failed to get command output for %s", cmd);
return smprintf(UNKNOWN_STR);
}
- fgets(buf, sizeof(buf), fp);
- buf[s
izeof
(buf)-1] = '\0';
+ fgets(buf, sizeof(buf)
-1
, fp);
+ buf[s
trlen
(buf)-1] = '\0';
pclose(fp);
return smprintf("%s", buf);