summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2010-04-08 14:56:49 +0200
committerKarel Zak <kzak@redhat.com>2010-06-03 15:20:12 +0200
commit46e9ff0aebe0a58e62e5f964f9e8a021148175df (patch)
treeb2c56d076717aab607e7c716cb643015f6009703
parentfdedb45e3105a2d1cb6baf41b792d955ccd7a0bb (diff)
downloadutil-linux-old-46e9ff0aebe0a58e62e5f964f9e8a021148175df.tar.gz
lib: tt.c: don't print header for empty table
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--lib/tt.c2
1 files changed, 1 insertions, 1 deletions
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