summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarel Zak2010-04-08 14:56:49 +0200
committerKarel Zak2010-06-03 15:20:12 +0200
commit46e9ff0aebe0a58e62e5f964f9e8a021148175df (patch)
treeb2c56d076717aab607e7c716cb643015f6009703 /lib
parentfindmnt: rewrite to use lib/tt.c (diff)
downloadkernel-qcow2-util-linux-46e9ff0aebe0a58e62e5f964f9e8a021148175df.tar.gz
kernel-qcow2-util-linux-46e9ff0aebe0a58e62e5f964f9e8a021148175df.tar.xz
kernel-qcow2-util-linux-46e9ff0aebe0a58e62e5f964f9e8a021148175df.zip
lib: tt.c: don't print header for empty table
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/tt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tt.c b/lib/tt.c
index e33d63210..cd6519709 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