From 31fca6bb2d242b959cd1ca6f37e910874ad9d177 Mon Sep 17 00:00:00 2001 From: albert <> Date: Mon, 10 Jan 2005 21:32:49 +0000 Subject: [PATCH] fix built-in test code --- ps/output.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ps/output.c b/ps/output.c index fe71975c..340bb1b4 100644 --- a/ps/output.c +++ b/ps/output.c @@ -1128,12 +1128,14 @@ fail: static int pr_t_unlimited(char *restrict const outbuf, const proc_t *restrict const pp){ static const char *const vals[] = {"[123456789-12345] ","ps","123456789-123456"}; (void)pp; - return snprintf(outbuf, max_rightward+1, "%s", vals[lines_to_next_header%3u]); + snprintf(outbuf, max_rightward+1, "%s", vals[lines_to_next_header%3u]); + return strlen(outbuf); } static int pr_t_unlimited2(char *restrict const outbuf, const proc_t *restrict const pp){ static const char *const vals[] = {"unlimited", "[123456789-12345] ","ps","123456789-123456"}; (void)pp; - return snprintf(outbuf, max_rightward+1, "%s", vals[lines_to_next_header%4u]); + snprintf(outbuf, max_rightward+1, "%s", vals[lines_to_next_header%4u]); + return strlen(outbuf); } // like "etime"