The table allows to add columns on the fly when lines already exist.
So, it does not make sense to reject request to add line to table
without columns.
Signed-off-by: Karel Zak <kzak@redhat.com>
*/
int scols_table_add_line(struct libscols_table *tb, struct libscols_line *ln)
{
- if (!tb || !ln || tb->ncols == 0)
+ if (!tb || !ln)
return -EINVAL;
if (tb->ncols > ln->ncells) {
{
struct libscols_line *ln;
- if (!tb || !tb->ncols)
+ if (!tb)
return NULL;
ln = scols_new_line();