From 621204bbf6750f1ba3977b43bb35375ddda6b5ae Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 27 Oct 2006 09:03:24 +0000 Subject: get_terminal_width_height: do not pass insanely large values --- coreutils/watch.c | 1 - 1 file changed, 1 deletion(-) (limited to 'coreutils') 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) time_t t; get_terminal_width_height(STDOUT_FILENO, &width, 0); - if (width < 1) width = 1; // paranoia header = xrealloc(header, width--); // '%-*s' pads header with spaces to the full width snprintf(header, width, "Every %ds: %-*s", period, width, cmd); -- cgit v1.2.3