aboutsummaryrefslogtreecommitdiff
path: root/procps/watch.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-23 01:44:22 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-23 01:44:22 +0200
commit641caaec3d495f3a92f652f12ab70b02ba9312ac (patch)
tree2a1aeb78c4344d1cd4423cdd96b581a797392b58 /procps/watch.c
parenta96074874857b31361d02ead97a1152164568918 (diff)
downloadbusybox-w32-641caaec3d495f3a92f652f12ab70b02ba9312ac.tar.gz
busybox-w32-641caaec3d495f3a92f652f12ab70b02ba9312ac.tar.bz2
busybox-w32-641caaec3d495f3a92f652f12ab70b02ba9312ac.zip
libbb: factor out code which queries screen width
function old new delta get_terminal_width - 17 +17 stty_main 1196 1197 +1 pstree_main 321 319 -2 ls_main 735 731 -4 watch_main 232 225 -7 bb_progress_update 714 706 -8 ps_main 555 543 -12 run_applet_and_exit 708 695 -13 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 18/-46) Total: -28 byte Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rw-r--r--procps/watch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/procps/watch.c b/procps/watch.c
index 0397f21bf..97aa04767 100644
--- a/procps/watch.c
+++ b/procps/watch.c
@@ -72,7 +72,7 @@ int watch_main(int argc UNUSED_PARAM, char **argv)
72 72
73 // STDERR_FILENO is procps3 compat: 73 // STDERR_FILENO is procps3 compat:
74 // "watch ls 2>/dev/null" does not detect tty size 74 // "watch ls 2>/dev/null" does not detect tty size
75 get_terminal_width_height(STDERR_FILENO, &new_width, NULL); 75 new_width = get_terminal_width(STDERR_FILENO);
76 if (new_width != width) { 76 if (new_width != width) {
77 width = new_width; 77 width = new_width;
78 free(header); 78 free(header);