From nobody Wed Oct 22 12:30:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1759929813; cv=none; d=zohomail.com; s=zohoarc; b=DPkQQE1nIxkcQ0Rbb6zjRnzn8l/t0v4VRmloum9sUl0G1TzXht884zZiHH1H4S6I+75E23U7CfPwdsNxBuNhpKYER48iaBP8fUVbWZ5sq0mkBdCOyFoeW9x2kx5hKZ89vgBufQeRVkTOsKdVmeA5WdUBRCXj6GgIeALZY9Azp5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1759929813; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=2aV1eB5UV8upGyl4UnZCbmezoMBizFvd32yig2X5mIo=; b=cleT94uod7wveHBtGqNNsamgOklHlYQPy1ngBEIWD10/x/UmrxSihLmzDQof/jcj6jh97w+fLZ9JC7hRWEeI+83z0n2A6HTvnawAmcra/1vrhTA3ZcXxE4n6DZCWPfcExIOiWfl8o9LQgog+YV36vu3IUcrY4VFmaoIb7C4wwt8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1759929813280843.8923348693362; Wed, 8 Oct 2025 06:23:33 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A10734188C; Wed, 8 Oct 2025 09:23:32 -0400 (EDT) Received: from [172.19.199.17] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id BE6C3446C1; Wed, 8 Oct 2025 09:17:48 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id DF35E41B30; Wed, 8 Oct 2025 08:55:41 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5A0014425B for ; Wed, 8 Oct 2025 08:54:30 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-441-orWzwliCOzWtcgJM5A_F7Q-1; Wed, 08 Oct 2025 08:54:28 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D0DF218004D4 for ; Wed, 8 Oct 2025 12:54:27 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.3.236]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1E22719560A2 for ; Wed, 8 Oct 2025 12:54:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759928070; h=from:from: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; bh=2aV1eB5UV8upGyl4UnZCbmezoMBizFvd32yig2X5mIo=; b=PdI76UL+yrUdLl4L74eozpYqy6ZghaYSrhyi2ZJRQ8CYFTiBq6/9yTgYEiAf8uSJxnWA/D yl4DtCGe8EUv0N0L2gs0S+SBz+MS5sbKzj3e1ucZ5UHXWY2XvKj39z33MEisdDCYMNYnrF 6NCoDsG2wJNJAw9Lx+D4z10mXOKePN8= X-MC-Unique: orWzwliCOzWtcgJM5A_F7Q-1 X-Mimecast-MFC-AGG-ID: orWzwliCOzWtcgJM5A_F7Q_1759928067 To: devel@lists.libvirt.org Subject: [PATCH v2 19/29] qemu_command: Prefer virBufferAddLit() in qemuBuildCpuHypervCommandLine() Date: Wed, 8 Oct 2025 14:53:51 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: tB2k5iSnkQqXFxQF-EU2HZs5Sta2OBp7eFLHMF7PhfA_1759928067 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GLKCZGYFTC5TT777OW5SOUCMYPHQS7OK X-Message-ID-Hash: GLKCZGYFTC5TT777OW5SOUCMYPHQS7OK X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1759929814615154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Using virBufferAsprintf() just to concatenate two literal strings is excessive. Use virBufferAddLit(). Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 542022b889..65b50740ce 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6464,7 +6464,7 @@ qemuBuildCpuHypervCommandLine(virBuffer *buf, break; =20 case VIR_DOMAIN_HYPERV_MODE_PASSTHROUGH: - virBufferAsprintf(buf, ",hv-%s=3Don", "passthrough"); + virBufferAddLit(buf, ",hv-passthrough=3Don"); break; =20 case VIR_DOMAIN_HYPERV_MODE_NONE: --=20 2.49.1