From nobody Sun Feb 8 19:59:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611667743; cv=none; d=zohomail.com; s=zohoarc; b=GssCH4buTB0GwFuI4+JGuVtieriCz4GeXDhlRpRW3owRtnlQQG1bRVQXKRjDgWInguIpCeMBcfKJ8hh8qGE5iXOgrI7S97WTGqIF5yJpPgNVLhLEW+Py2lfE7KCzB6mznWHkmM9mXRiMHFBZngeaPfIbe4tWdcR1B82Wzq3TU+I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611667743; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oOfC+7QSCk3L8SU2UoPI0ucjU/Idxphdkcef24Shoa4=; b=CTuYlNEHf1JHt6ZVkS7kEkLklCReCgOPnPGjs1uBRBrs0KkhvfOrkRpVF3r/F1j8kEnqcwyYuxPBwiF8C/0qJx6SEknwzDK7Svyj88L0TrBXULae6YbljQYdDAaRkFPfEVzkFlCLE+pcvkaPlZmFoOuWSCAqZf+LmS019tbECrI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1611667743872556.9848153385955; Tue, 26 Jan 2021 05:29:03 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-383-gliMQLtSO1iySkbMJU0IbQ-1; Tue, 26 Jan 2021 08:27:49 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6F3958030AE; Tue, 26 Jan 2021 13:27:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 49D0C10016FB; Tue, 26 Jan 2021 13:27:43 +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 14B0750033; Tue, 26 Jan 2021 13:27:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10QDRQ4V001373 for ; Tue, 26 Jan 2021 08:27:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id CC3BE1880F; Tue, 26 Jan 2021 13:27:26 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E2235C276 for ; Tue, 26 Jan 2021 13:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611667742; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=oOfC+7QSCk3L8SU2UoPI0ucjU/Idxphdkcef24Shoa4=; b=HCgia/YbPubHErGRnoPfKVBPWKbPgs9m3yhtcHpJN3X8kT4wNeu25AnBf02ogHpNv2MWs5 r3BScb86iz0915zF7m0DwWJFSHpt0XbslGYcBMWLdIcJHMTvejkv+s3JJnlPI7OB+ckc8F pWMKsCf/H+Bmp24q574MaP5J+SG9rFw= X-MC-Unique: gliMQLtSO1iySkbMJU0IbQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 5/9] vshReadlineParse: Rename @buf to @line Date: Tue, 26 Jan 2021 14:27:09 +0100 Message-Id: <4f2f2e2119e2a5f4f89af6ca75190a9f0de4bf89.1611667532.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" In next commit the block that does escaping of returned string will be brought into this block. But both contain variable @buf and use it in different contexts. Rename @buf from @state =3D=3D 0 block to @line which reflects its purpose better. Signed-off-by: Michal Privoznik --- tools/vsh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 9a7ca6776b..abbd323e24 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2709,15 +2709,15 @@ vshReadlineParse(const char *text, int state) g_autoptr(vshCmd) partial =3D NULL; const vshCmdDef *cmd =3D NULL; const vshCmdOptDef *opt =3D NULL; - g_autofree char *buf =3D g_strdup(rl_line_buffer); + g_autofree char *line =3D g_strdup(rl_line_buffer); =20 g_strfreev(list); list =3D NULL; list_index =3D 0; =20 - *(buf + rl_point) =3D '\0'; + *(line + rl_point) =3D '\0'; =20 - vshCommandStringParse(NULL, buf, &partial); + vshCommandStringParse(NULL, line, &partial); =20 if (partial) { cmd =3D partial->def; --=20 2.26.2