aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-27 09:03:24 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-27 09:03:24 +0000
commit9bc0f50defc28a31a2d214e654ec48e2a1bcc897 (patch)
treecd34a619db35dccb76043c1bf118d297e17ac436 /coreutils
parent8b039ac7df3ae06554165c79429b5d06240080c1 (diff)
downloadbusybox-w32-9bc0f50defc28a31a2d214e654ec48e2a1bcc897.tar.gz
busybox-w32-9bc0f50defc28a31a2d214e654ec48e2a1bcc897.tar.bz2
busybox-w32-9bc0f50defc28a31a2d214e654ec48e2a1bcc897.zip
get_terminal_width_height: do not pass insanely large values
git-svn-id: svn://busybox.net/trunk/busybox@16452 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/watch.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/coreutils/watch.c b/coreutils/watch.c
index b188b4176..81856c867 100644
--- a/coreutils/watch.c
+++ b/coreutils/watch.c
@@ -58,7 +58,6 @@ int watch_main(int argc, char **argv)
58 time_t t; 58 time_t t;
59 59
60 get_terminal_width_height(STDOUT_FILENO, &width, 0); 60 get_terminal_width_height(STDOUT_FILENO, &width, 0);
61 if (width < 1) width = 1; // paranoia
62 header = xrealloc(header, width--); 61 header = xrealloc(header, width--);
63 // '%-*s' pads header with spaces to the full width 62 // '%-*s' pads header with spaces to the full width
64 snprintf(header, width, "Every %ds: %-*s", period, width, cmd); 63 snprintf(header, width, "Every %ds: %-*s", period, width, cmd);