aboutsummaryrefslogtreecommitdiff
path: root/watch.c
diff options
context:
space:
mode:
Diffstat (limited to 'watch.c')
-rw-r--r--watch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/watch.c b/watch.c
index 5cd66f3..7b2da43 100644
--- a/watch.c
+++ b/watch.c
@@ -90,7 +90,7 @@ main(int argc, char **argv)
WINDOW *outw = stdscr;
struct sigaction sa;
char buf[_POSIX_MAX_INPUT];
- char cmd[_POSIX_MAX_INPUT];
+ char cmd[_POSIX_MAX_INPUT + 5];
char out[_POSIX_MAX_INPUT];
int hold_curs;
int ret = -1;
@@ -130,7 +130,7 @@ main(int argc, char **argv)
/* NOTREACHED */
memcpy(cmd, buf, sizeof(buf));
- strlcat(cmd, " 2>&1", sizeof(cmd) - 5);
+ strlcat(cmd, " 2>&1", sizeof(cmd));
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;