From nobody Sun Feb 8 19:59:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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=1571752855; cv=none; d=zoho.com; s=zohoarc; b=VetUgAAVxcuyypodQY/ENJrpArBEWtPd9peDgk9WUehdtCiFKhJlODZEMo5rarqRcQaTkVi5QYKJUFrsH1MGqKjTaqU9Ud5V39kXFYaxV+s2/pXCJYZNhUw2eHGeaAOInGOprgV0GDVtjMx3pYbKvrr3pPMY4uVlyegi7Aj46C4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571752855; 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=+hnrZ6LAaZSwtbxWPua5WoXtsoxwjYVj03TfzpQJs6M=; b=HjXdudsojRxNpMukvhMHAonnnXFe4xhAJ3z5JD7CXSNKGJiUSw0BSIqJzzFNOy8QuqslcwXZwZsjsmpN9bkgT1MG+0DpZ9ImrQ/pLMyFuPnDXURBuP5IjU4q/vzwqLqQ2uNGb1H3gEts2Wv7qTGqf1w7kHtLcD3tfr1wGODequ8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1571752855857918.044252500529; Tue, 22 Oct 2019 07:00:55 -0700 (PDT) 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-108-t_j6-WYJMJKGXPtF2tvkGw-1; Tue, 22 Oct 2019 10:00:52 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0E9B380183E; Tue, 22 Oct 2019 14:00:45 +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 568C86012E; Tue, 22 Oct 2019 14:00:44 +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 A58F93FB52; Tue, 22 Oct 2019 14:00:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9ME0c0v002566 for ; Tue, 22 Oct 2019 10:00:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 959A76017E; Tue, 22 Oct 2019 14:00:38 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0ACBB60471 for ; Tue, 22 Oct 2019 14:00:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571752854; 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=+hnrZ6LAaZSwtbxWPua5WoXtsoxwjYVj03TfzpQJs6M=; b=BxpnEZ2uY99dJO067yIPRMNo7s4hFuUUk5bBbIwA+4ZmUCxXK38JraN6k+FaR943VB6iiA E620DN0Ip2PYxmHSY78soIkHhhEKu+upmUprauO3E2EB9QpZi+KFnZ18UGdpBe7fAs6lD7 HJyLml5iGQlcseX+BtbuAm3nOBJ0y54= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 22 Oct 2019 15:57:44 +0200 Message-Id: <3ee38321c6da334b9f7962e19ea10eb6cd2ec013.1571752582.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 40/75] cpu: Use g_strdup_printf() instead of virAsprintf() 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.79 on 10.5.11.11 X-MC-Unique: t_j6-WYJMJKGXPtF2tvkGw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/cpu/cpu_ppc64.c | 19 ++++++++----------- src/cpu/cpu_x86.c | 14 ++++++-------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 990bbbd45f..3236a9616e 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -460,9 +460,8 @@ ppc64Compute(virCPUDefPtr host, VIR_DEBUG("CPU arch %s does not match host arch", virArchToString(cpu->arch)); if (message) - virAsprintf(message, - _("CPU arch %s does not match host arch"), - virArchToString(cpu->arch)); + *message =3D g_strdup_printf(_("CPU arch %s does not match= host arch"), + virArchToString(cpu->arch)); =20 ret =3D VIR_CPU_COMPARE_INCOMPATIBLE; goto cleanup; @@ -477,10 +476,9 @@ ppc64Compute(virCPUDefPtr host, VIR_DEBUG("host CPU vendor does not match required CPU vendor %s", cpu->vendor); if (message) { - virAsprintf(message, - _("host CPU vendor does not match required " - "CPU vendor %s"), - cpu->vendor); + *message =3D g_strdup_printf(_("host CPU vendor does not match= required " + "CPU vendor %s"), + cpu->vendor); } =20 ret =3D VIR_CPU_COMPARE_INCOMPATIBLE; @@ -532,10 +530,9 @@ ppc64Compute(virCPUDefPtr host, VIR_DEBUG("host CPU model does not match required CPU model %s", guest_model->name); if (message) { - virAsprintf(message, - _("host CPU model does not match required " - "CPU model %s"), - guest_model->name); + *message =3D g_strdup_printf(_("host CPU model does not match = required " + "CPU model %s"), + guest_model->name); } =20 ret =3D VIR_CPU_COMPARE_INCOMPATIBLE; diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 8418339d6f..82403472df 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -1725,7 +1725,7 @@ virCPUx86DataParse(xmlXPathContextPtr ctxt) goto error; \ } \ if (message) \ - virAsprintf(message, "%s: %s", _(MSG), flagsStr); \ + *message =3D g_strdup_printf("%s: %s", _(MSG), flagsStr); \ VIR_DEBUG("%s: %s", MSG, flagsStr); \ VIR_FREE(flagsStr); \ ret =3D VIR_CPU_COMPARE_INCOMPATIBLE; \ @@ -1767,9 +1767,8 @@ x86Compute(virCPUDefPtr host, VIR_DEBUG("CPU arch %s does not match host arch", virArchToString(cpu->arch)); if (message) { - virAsprintf(message, - _("CPU arch %s does not match host arch"), - virArchToString(cpu->arch)); + *message =3D g_strdup_printf(_("CPU arch %s does not match= host arch"), + virArchToString(cpu->arch)); } return VIR_CPU_COMPARE_INCOMPATIBLE; } @@ -1783,10 +1782,9 @@ x86Compute(virCPUDefPtr host, VIR_DEBUG("host CPU vendor does not match required CPU vendor %s", cpu->vendor); if (message) { - virAsprintf(message, - _("host CPU vendor does not match required " - "CPU vendor %s"), - cpu->vendor); + *message =3D g_strdup_printf(_("host CPU vendor does not match= required " + "CPU vendor %s"), + cpu->vendor); } =20 return VIR_CPU_COMPARE_INCOMPATIBLE; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list