From: Denys Vlasenko Date: Sun, 5 Dec 2010 15:05:03 +0000 (+0100) Subject: pstree: tiny shrink X-Git-Tag: 1_19_0~470 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c32e626988ab35ba62bbe5b64dc8b86cd9a76bac;p=oweals%2Fbusybox.git pstree: tiny shrink Signed-off-by: Denys Vlasenko --- diff --git a/procps/pstree.c b/procps/pstree.c index 25fb65d79..7e127739c 100644 --- a/procps/pstree.c +++ b/procps/pstree.c @@ -111,10 +111,11 @@ static void maybe_free_buffers(void) static void out_char(char c) { G.cur_x++; + if (G.cur_x > G.output_width) + return; if (G.cur_x == G.output_width) c = '+'; - if (G.cur_x <= G.output_width) - putchar(c); + putchar(c); } /* NB: this function is never called with "bad" chars