From 46e9ff0aebe0a58e62e5f964f9e8a021148175df Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 8 Apr 2010 14:56:49 +0200 Subject: [PATCH] lib: tt.c: don't print header for empty table Signed-off-by: Karel Zak --- lib/tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tt.c b/lib/tt.c index e33d6321..cd651970 100644 --- a/lib/tt.c +++ b/lib/tt.c @@ -541,7 +541,7 @@ static void print_header(struct tt *tb, char *buf, size_t bufsz) { struct list_head *p; - if (tb->flags & TT_FL_NOHEADINGS) + if ((tb->flags & TT_FL_NOHEADINGS) || list_empty(&tb->tb_lines)) return; /* set width according to the size of data -- 2.39.5