From nobody Mon Feb 9 04:03:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1543309674044661.9117493931999; Tue, 27 Nov 2018 01:07:54 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 754AD308339D; Tue, 27 Nov 2018 09:07:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB4885C6A6; Tue, 27 Nov 2018 09:07:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 39565181B9E5; Tue, 27 Nov 2018 09:07:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAR97hoO013192 for ; Tue, 27 Nov 2018 04:07:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id B456219493; Tue, 27 Nov 2018 09:07:43 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1026C19C65; Tue, 27 Nov 2018 09:07:42 +0000 (UTC) From: Simon Kobyda To: libvir-list@redhat.com Date: Tue, 27 Nov 2018 10:07:32 +0100 Message-Id: <20181127090733.30970-2-skobyda@redhat.com> In-Reply-To: <20181127090733.30970-1-skobyda@redhat.com> References: <20181127090733.30970-1-skobyda@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Simon Kobyda Subject: [libvirt] [PATCH 1/2] vsh-table: Get rid of trailing spaces X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 27 Nov 2018 09:07:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Get rid of trailing spaces which can be found after last column in tables. Signed-off-by: Simon Kobyda --- tools/vsh-table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/vsh-table.c b/tools/vsh-table.c index 9b4a34c1e6..fb656ffeb0 100644 --- a/tools/vsh-table.c +++ b/tools/vsh-table.c @@ -348,8 +348,10 @@ vshTableRowPrint(vshTableRowPtr row, for (i =3D 0; i < row->ncells; i++) { virBufferAsprintf(buf, " %s", row->cells[i]); =20 - for (j =3D 0; j < maxwidths[i] - widths[i] + 2; j++) - virBufferAddChar(buf, ' '); + if (i < (row->ncells - 1)) { + for (j =3D 0; j < maxwidths[i] - widths[i] + 2; j++) + virBufferAddChar(buf, ' '); + } } virBufferAddChar(buf, '\n'); } --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list