vsh-table: Get rid of trailing spaces

Get rid of trailing spaces which can be found after last column in tables.

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
This commit is contained in:
Simon Kobyda 2018-11-27 10:07:32 +01:00 committed by Michal Privoznik
parent 4b4ed783ba
commit 071488983c
3 changed files with 38 additions and 36 deletions

View File

@ -348,9 +348,11 @@ vshTableRowPrint(vshTableRowPtr row,
for (i = 0; i < row->ncells; i++) {
virBufferAsprintf(buf, " %s", row->cells[i]);
if (i < (row->ncells - 1)) {
for (j = 0; j < maxwidths[i] - widths[i] + 2; j++)
virBufferAddChar(buf, ' ');
}
}
virBufferAddChar(buf, '\n');
}