From nobody Mon Feb 9 04:44:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1571752881; cv=none; d=zoho.com; s=zohoarc; b=U7nI79p3LOOD2rtpDhretnoY1ZYMxy5GQA3W7bQ8TBhQnDXLqJQXf2peBVr3Oc0hahOzR7RXz9rj4RPl56Svo7HOr1DcUzLZpqhGD7UKGwllg1r6SYx9NG3z2zcLiGDy8N7/SbPPzdK7YvudX4oJ3NG5mH5THIBcpxJ6iXCjDU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571752881; 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=6irgb2BhEk2iFTUVv6GppSNm2/8gwjpoUuSK6Rnvjew=; b=YrhHZRmq1l4B6gdCmJ4H4LBUG/MID/K+WBDlRIe0EUIaNEAuefj3oN5ffPZ9GGIfjVR0M42Of6ndU8i29TyENi0sHrwkSOBAbAz1eIXOrKr4BH+w8b4vnl8S2HIPvlEoIiWAqu7pDORwWzjG2q/DZCZdAgw+9s+u7VosYp8kJ1k= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1571752881383331.08319503240614; Tue, 22 Oct 2019 07:01:21 -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-57-7BdrQTUsNuinwe9x0_pG1g-1; Tue, 22 Oct 2019 10:01:18 -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 753EE100551F; Tue, 22 Oct 2019 14:01:11 +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 378795DC18; Tue, 22 Oct 2019 14:01:11 +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 9C1FE3FB42; Tue, 22 Oct 2019 14:01:10 +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 x9ME0lwl002708 for ; Tue, 22 Oct 2019 10:00:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id DD7F46012C; Tue, 22 Oct 2019 14:00:47 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1FEDB60167 for ; Tue, 22 Oct 2019 14:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571752880; 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=6irgb2BhEk2iFTUVv6GppSNm2/8gwjpoUuSK6Rnvjew=; b=iOxsMDtgV+aPezrr8kZUg6oAEBthrb4ad5/s9gumkcf6ZvvVJ1yVaqpdpp8jraxTPKi66i OXuRMf1Mf4mdY6Jhrgebt9jxeHT2RoIjQAKy6P9GucJ/QmXXKRKVvSpUl5jBR0219bPXfd tcCNiuS4SxrpyUOQApkcsyRaa0JCqcY= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 22 Oct 2019 15:57:54 +0200 Message-Id: <1e893fac863bb11a28860fbba7431be19b0dfac1.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 50/75] nwfilter: 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: 7BdrQTUsNuinwe9x0_pG1g-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: Daniel Henrique Barboza --- src/nwfilter/nwfilter_dhcpsnoop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcp= snoop.c index b4ce8a0613..4e77ca0d2d 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.c +++ b/src/nwfilter/nwfilter_dhcpsnoop.c @@ -315,7 +315,7 @@ virNWFilterSnoopActivate(virNWFilterSnoopReqPtr req) { char *key; =20 - virAsprintf(&key, "%p-%d", req, req->ifindex); + key =3D g_strdup_printf("%p-%d", req, req->ifindex); =20 virNWFilterSnoopActiveLock(); =20 @@ -1080,7 +1080,7 @@ virNWFilterSnoopDHCPOpen(const char *ifname, virMacAd= dr *mac, * extend the filter with the macaddr of the VM; filter the * more unlikely parameters first, then go for the MAC */ - virAsprintf(&ext_filter, "%s and ether src %s", filter, macaddr); + ext_filter =3D g_strdup_printf("%s and ether src %s", filter, maca= ddr); } else { /* * Some DHCP servers respond via MAC broadcast; we rely on later @@ -1763,7 +1763,7 @@ virNWFilterSnoopLeaseFileWrite(int lfd, const char *i= fkey, } =20 /* time intf ip dhcpserver */ - virAsprintf(&lbuf, "%u %s %s %s\n", ipl->timeout, ifkey, ipstr, dhcpst= r); + lbuf =3D g_strdup_printf("%u %s %s %s\n", ipl->timeout, ifkey, ipstr, = dhcpstr); len =3D strlen(lbuf); =20 if (safewrite(lfd, lbuf, len) !=3D len) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list