diff options
Diffstat (limited to 'procps')
-rw-r--r-- | procps/ps.c | 4 | ||||
-rw-r--r-- | procps/pstree.c | 2 | ||||
-rw-r--r-- | procps/watch.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/procps/ps.c b/procps/ps.c index bde5f9485..fbafa68a9 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -622,7 +622,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv) * and such large widths */ terminal_width = MAX_WIDTH; if (isatty(1)) { - get_terminal_width_height(0, &terminal_width, NULL); + terminal_width = get_terminal_width(0); if (--terminal_width > MAX_WIDTH) terminal_width = MAX_WIDTH; } @@ -672,7 +672,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) if (w_count) { terminal_width = (w_count == 1) ? 132 : MAX_WIDTH; } else { - get_terminal_width_height(0, &terminal_width, NULL); + terminal_width = get_terminal_width(0); /* Go one less... */ if (--terminal_width > MAX_WIDTH) terminal_width = MAX_WIDTH; diff --git a/procps/pstree.c b/procps/pstree.c index ed1a41289..c5fb83688 100644 --- a/procps/pstree.c +++ b/procps/pstree.c @@ -381,7 +381,7 @@ int pstree_main(int argc UNUSED_PARAM, char **argv) INIT_G(); - get_terminal_width_height(0, &G.output_width, NULL); + G.output_width = get_terminal_width(0); opt_complementary = "?1"; getopt32(argv, "p"); 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) // STDERR_FILENO is procps3 compat: // "watch ls 2>/dev/null" does not detect tty size - get_terminal_width_height(STDERR_FILENO, &new_width, NULL); + new_width = get_terminal_width(STDERR_FILENO); if (new_width != width) { width = new_width; free(header); |