From: Karel Zak Date: Thu, 8 Apr 2010 12:56:49 +0000 (+0200) Subject: lib: tt.c: don't print header for empty table X-Git-Tag: v2.18-rc1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46e9ff0aebe0a58e62e5f964f9e8a021148175df;p=thirdparty%2Futil-linux.git lib: tt.c: don't print header for empty table Signed-off-by: Karel Zak --- diff --git a/lib/tt.c b/lib/tt.c index e33d63210f..cd65197090 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