From nobody Sun Feb 8 23:05:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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.61 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=1571753057; cv=none; d=zoho.com; s=zohoarc; b=aPeTSa3ql8GpjkitcYbAM7k0TCZclWQUI3C5ERgAWdp8ugPKlipy5GG4TkXnDv4M68ViXCurqcGKFMmopEgBfsiElej8csJD357z6/9G/UgEQUXydtpUkOVU6tbJKxqJt5yVRumPF9RSj0wodS3N/1psiX2wPi8XzJWub6KaKyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571753057; 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=5bZlN5njQZ6hIjtS4SSeo2Nqsb4gf/pK9H5ihiIpUug=; b=f6qRHOosd0yC3Zi0Dp3IYXp5lm2q0XiH6QI24jVmVlpLkI7fVUILatuA65LxiNWIz/Kyu2n1JwGZ2hX95wCcVrTo6ReQugjCv69K25vLiDLmlYctFkn9WyClLoZjUX1ehZNLXv1KE4ony8TshiCFryPcCeylYc+FRBt515LJ4oc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1571753057626759.3260848506902; Tue, 22 Oct 2019 07:04:17 -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-341-IgYmrQ1UND-1SIkmZ1T4YA-1; Tue, 22 Oct 2019 10:00:56 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7E5FA107AD3A; Tue, 22 Oct 2019 14:00:49 +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 41F815DD78; Tue, 22 Oct 2019 14:00:49 +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 E42A83FB45; Tue, 22 Oct 2019 14:00:48 +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 x9ME0gNX002634 for ; Tue, 22 Oct 2019 10:00:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 79773605AD; Tue, 22 Oct 2019 14:00:41 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC85C6012E for ; Tue, 22 Oct 2019 14:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571753056; 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=5bZlN5njQZ6hIjtS4SSeo2Nqsb4gf/pK9H5ihiIpUug=; b=GZ1RFtAR1bz0DpUPN/HCDPmuRaPkgOfy3pUwlVosKrnmo2v041Nm51HCMAlKctEXcIvRul PGH/2bObfwLGjPVqwGqOhUJr2O4rHLukjJa/hgcGlGjTDMZdLOjOL5fUsQ1O7l09jV5dts sHQAhfRpnwTy6sJYhURjPPDnQDu0Gm8= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 22 Oct 2019 15:57:47 +0200 Message-Id: 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 43/75] interface: 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.14 X-MC-Unique: IgYmrQ1UND-1SIkmZ1T4YA-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/interface/interface_backend_netcf.c | 4 ++-- src/interface/interface_backend_udev.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/interface/interface_backend_netcf.c b/src/interface/interf= ace_backend_netcf.c index 170361e761..ac50deb500 100644 --- a/src/interface/interface_backend_netcf.c +++ b/src/interface/interface_backend_netcf.c @@ -101,13 +101,13 @@ netcfStateInitialize(bool privileged, driver->privileged =3D privileged; =20 if (privileged) { - virAsprintf(&driver->stateDir, "%s/libvirt/interface", RUNSTATEDIR= ); + driver->stateDir =3D g_strdup_printf("%s/libvirt/interface", RUNST= ATEDIR); } else { g_autofree char *rundir =3D NULL; =20 if (!(rundir =3D virGetUserRuntimeDirectory())) goto error; - virAsprintf(&driver->stateDir, "%s/interface/run", rundir); + driver->stateDir =3D g_strdup_printf("%s/interface/run", rundir); } =20 if (virFileMakePathWithMode(driver->stateDir, S_IRWXU) < 0) { diff --git a/src/interface/interface_backend_udev.c b/src/interface/interfa= ce_backend_udev.c index a906756830..b7b06ed67a 100644 --- a/src/interface/interface_backend_udev.c +++ b/src/interface/interface_backend_udev.c @@ -856,7 +856,7 @@ udevGetIfaceDefBridge(struct udev *udev, } =20 /* Members of the bridge */ - virAsprintf(&member_path, "%s/%s", udev_device_get_syspath(dev), "brif= "); + member_path =3D g_strdup_printf("%s/%s", udev_device_get_syspath(dev),= "brif"); =20 /* Get each member of the bridge */ member_count =3D scandir(member_path, &member_list, @@ -918,7 +918,7 @@ udevGetIfaceDefVlan(struct udev *udev G_GNUC_UNUSED, const char *dev_prefix =3D "\nDevice: "; int ret =3D -1; =20 - virAsprintf(&procpath, "/proc/net/vlan/%s", name); + procpath =3D g_strdup_printf("/proc/net/vlan/%s", name); =20 if (virFileReadAll(procpath, BUFSIZ, &buf) < 0) goto cleanup; @@ -1161,13 +1161,13 @@ udevStateInitialize(bool privileged, driver->lockFD =3D -1; =20 if (privileged) { - virAsprintf(&driver->stateDir, "%s/libvirt/interface", RUNSTATEDIR= ); + driver->stateDir =3D g_strdup_printf("%s/libvirt/interface", RUNST= ATEDIR); } else { g_autofree char *rundir =3D NULL; =20 if (!(rundir =3D virGetUserRuntimeDirectory())) goto cleanup; - virAsprintf(&driver->stateDir, "%s/interface/run", rundir); + driver->stateDir =3D g_strdup_printf("%s/interface/run", rundir); } =20 if (virFileMakePathWithMode(driver->stateDir, S_IRWXU) < 0) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list