aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-23 22:43:02 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-23 22:43:02 +0000
commit703aa13ff5e2b795319a3e900c1f8df6e3da47b5 (patch)
tree861026de3497f90795ef52dfd196097a37b754c7 /coreutils
parent4e70bf4359676b1ecaf658c7550d60a15ec1a02a (diff)
downloadbusybox-w32-703aa13ff5e2b795319a3e900c1f8df6e3da47b5.tar.gz
busybox-w32-703aa13ff5e2b795319a3e900c1f8df6e3da47b5.tar.bz2
busybox-w32-703aa13ff5e2b795319a3e900c1f8df6e3da47b5.zip
watch: fix warning
getty: fix breakage; fix excessive stack usage
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/watch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/watch.c b/coreutils/watch.c
index e3e9e06bb..b188b4176 100644
--- a/coreutils/watch.c
+++ b/coreutils/watch.c
@@ -58,8 +58,9 @@ 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
61 header = xrealloc(header, width--); 62 header = xrealloc(header, width--);
62 // We pad with spaces entire length 63 // '%-*s' pads header with spaces to the full width
63 snprintf(header, width, "Every %ds: %-*s", period, width, cmd); 64 snprintf(header, width, "Every %ds: %-*s", period, width, cmd);
64 time(&t); 65 time(&t);
65 thyme = ctime(&t); 66 thyme = ctime(&t);
@@ -75,4 +76,5 @@ int watch_main(int argc, char **argv)
75 system(cmd); 76 system(cmd);
76 sleep(period); 77 sleep(period);
77 } 78 }
79 return 0; // gcc thinks we can reach this :)
78} 80}