From 8b07baeec2fe0d8ba239f604cbfed4004437ad62 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 29 Jul 2024 02:04:52 -0500 Subject: [PATCH] Don't set stdout buffer twice (spotted by Peter Collingbourne) --- toys/posix/ps.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/toys/posix/ps.c b/toys/posix/ps.c index 676bfcb90..f1e1d1591 100644 --- a/toys/posix/ps.c +++ b/toys/posix/ps.c @@ -1522,13 +1522,11 @@ static void top_common( "iow", "irq", "sirq", "host"}; unsigned tock = 0; int i, lines, topoff = 0, done = 0; - char stdout_buf[8192]; if (!TT.fields) perror_exit("no -o"); // Avoid flicker and hide the cursor in interactive mode. if (!FLAG(b)) { - setbuffer(stdout, stdout_buf, sizeof(stdout_buf)); sigatexit(top_cursor_cleanup); xputsn("\e[?25l"); }