diff options
author | Karel Zak | 2014-04-18 12:01:59 +0200 |
---|---|---|
committer | Karel Zak | 2014-04-18 12:01:59 +0200 |
commit | 2dc0c6283b41a8331de13092c7287a3cb7160a0a (patch) | |
tree | d06cf428bc0b5d67ed7eaed5819fe60e4ebb3858 /libsmartcols/src/table_print.c | |
parent | libblkid: make new_partition() more robust (diff) | |
download | kernel-qcow2-util-linux-2dc0c6283b41a8331de13092c7287a3cb7160a0a.tar.gz kernel-qcow2-util-linux-2dc0c6283b41a8331de13092c7287a3cb7160a0a.tar.xz kernel-qcow2-util-linux-2dc0c6283b41a8331de13092c7287a3cb7160a0a.zip |
libsmartcols: fix buffer usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/table_print.c')
-rw-r--r-- | libsmartcols/src/table_print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c index c3dcfaefd..29420537e 100644 --- a/libsmartcols/src/table_print.c +++ b/libsmartcols/src/table_print.c @@ -297,6 +297,8 @@ static int cell_to_buffer(struct libscols_table *tb, assert(buf); assert(cl->seqnum <= tb->ncols); + buffer_reset_data(buf); + ce = scols_line_get_cell(ln, cl->seqnum); data = ce ? scols_cell_get_data(ce) : NULL; if (!data) @@ -308,8 +310,6 @@ static int cell_to_buffer(struct libscols_table *tb, /* * Tree stuff */ - buffer_reset_data(buf); - if (ln->parent) { rc = line_ascii_art_to_buffer(tb, ln->parent, buf); |