summaryrefslogtreecommitdiffstats
path: root/libsmartcols
diff options
context:
space:
mode:
Diffstat (limited to 'libsmartcols')
-rw-r--r--libsmartcols/src/table_print.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsmartcols/src/table_print.c b/libsmartcols/src/table_print.c
index 472c3616c..7a2c1a3dc 100644
--- a/libsmartcols/src/table_print.c
+++ b/libsmartcols/src/table_print.c
@@ -1409,6 +1409,7 @@ static int initialize_printing(struct libscols_table *tb, struct libscols_buffer
int rc;
DBG(TAB, ul_debugobj(tb, "initialize printing"));
+ *buf = NULL;
if (!tb->symbols) {
rc = scols_table_set_default_symbols(tb);
@@ -1516,7 +1517,7 @@ int scols_table_print_range( struct libscols_table *tb,
struct libscols_line *start,
struct libscols_line *end)
{
- struct libscols_buffer *buf;
+ struct libscols_buffer *buf = NULL;
struct libscols_iter itr;
int rc;
@@ -1602,7 +1603,7 @@ int scols_table_print_range_to_string(
static int __scols_print_table(struct libscols_table *tb, int *is_empty)
{
int rc = 0;
- struct libscols_buffer *buf;
+ struct libscols_buffer *buf = NULL;
if (!tb)
return -EINVAL;