diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-27 09:03:24 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-27 09:03:24 +0000 |
commit | 621204bbf6750f1ba3977b43bb35375ddda6b5ae (patch) | |
tree | cd34a619db35dccb76043c1bf118d297e17ac436 /coreutils | |
parent | d3d004dd3507f841745956a035fff68936378f9c (diff) | |
download | busybox-w32-621204bbf6750f1ba3977b43bb35375ddda6b5ae.tar.gz busybox-w32-621204bbf6750f1ba3977b43bb35375ddda6b5ae.tar.bz2 busybox-w32-621204bbf6750f1ba3977b43bb35375ddda6b5ae.zip |
get_terminal_width_height: do not pass insanely large values
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/watch.c | 1 |
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); |