diff options
author | Karel Zak <kzak@redhat.com> | 2010-04-08 14:56:49 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2010-06-03 15:20:12 +0200 |
commit | 46e9ff0aebe0a58e62e5f964f9e8a021148175df (patch) | |
tree | b2c56d076717aab607e7c716cb643015f6009703 | |
parent | fdedb45e3105a2d1cb6baf41b792d955ccd7a0bb (diff) | |
download | util-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |