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-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46e9ff0aebe0a58e62e5f964f9e8a021148175df;p=util-linux 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 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