From nobody Mon Feb 9 04:14:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1608082068; cv=none; d=zohomail.com; s=zohoarc; b=U1t6AhW3k4Ew+2qjymv2RchBMSCvOol1Ijkv5lqxZbRtYilHf7TD0jhIj1gAXAyE6mzdptaQRVlTrsff939vH+uOVyAqxMobQHGzIaQdNXtANtA4h8d7Rj54sIRTd6qN3e+TcwNLfZOorR09zUZmm/dWaTNsgeHA0IJT3LJNx7M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608082068; h=Content-Type:Content-Transfer-Encoding:Cc: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=hFns5KE54hX7T0IYN/vYqPFGvZ7cB/CJk+6PG7G0qcA=; b=eu1BL3sfvj88IJ9LayF7+iETFhKZ1DpgfLNrBwGmggIQaQxrV0YjYgqTgPsm0QjMPX/TFoPxlUGZL5zXE3m5eCaEITNVKmCe5bILvwcv02ShuUjifXDZL4GfMCuAoFCkq5BM8k5Bo0MAaYZtc8RMlyKJGGtbTrQz1SPpwvarLx0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 160808206887348.75123179593402; Tue, 15 Dec 2020 17:27:48 -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-555-4ukpwdLQMvWfBQ5K9KQlNg-1; Tue, 15 Dec 2020 20:27:46 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6873D1005D44; Wed, 16 Dec 2020 01:27:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 456A960C17; Wed, 16 Dec 2020 01:27:40 +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 0E5421809CA1; Wed, 16 Dec 2020 01:27:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BG1RUL1026619 for ; Tue, 15 Dec 2020 20:27:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id CECE95D9E3; Wed, 16 Dec 2020 01:27:30 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-38.phx2.redhat.com [10.3.112.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 868F05D9D7; Wed, 16 Dec 2020 01:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608082067; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=hFns5KE54hX7T0IYN/vYqPFGvZ7cB/CJk+6PG7G0qcA=; b=IBUxV+c4vJ2v+ETNCDd2/l7T9sXhV5U8JPXek4NH6tFzdT1UVZsruJw9k705ifBOy1EMtE s37QszzGFHPY1EyN8G1W9PTsMnS9Shgiu2fMXaJXZml4Pt1bsVAYsaZdzkPM/5eLLoDHyN 5R01sKjxbQ92tK5AVTwlYpCqF8LEcMw= X-MC-Unique: 4ukpwdLQMvWfBQ5K9KQlNg-1 From: Laine Stump To: libvir-list@redhat.com Subject: [PATCH 5/5] util: minor comment/formatting changes to virNetDevTapCreate() Date: Tue, 15 Dec 2020 20:27:23 -0500 Message-Id: <20201216012723.176100-6-laine@redhat.com> In-Reply-To: <20201216012723.176100-1-laine@redhat.com> References: <20201216012723.176100-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Shi Lei 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.12 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" The comment about auto-generating names was obsoleted by recent changes, and there was an unnecessary set of braces around a single line conditional body. Signed-off-by: Laine Stump --- src/util/virnetdevtap.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index cca2f614fe..8649978e53 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -174,15 +174,14 @@ int virNetDevTapCreate(char **ifname, int ret =3D -1; int fd =3D -1; =20 - /* if ifname is "vnet%d", then auto-generate a name for the new + /* if ifname is empty, then auto-generate a name for the new * device (the kernel could do this for us, but has a bad habit of * immediately re-using names that have just been released, which - * can lead to race conditions). - * if ifname is just a user-provided name, virNetDevGenerateName - * leaves it unchanged. */ - if (virNetDevGenerateName(ifname, VIR_NET_DEV_GEN_NAME_VNET) < 0) { + * can lead to race conditions). if ifname is just a + * user-provided name, virNetDevGenerateName leaves it + * unchanged. */ + if (virNetDevGenerateName(ifname, VIR_NET_DEV_GEN_NAME_VNET) < 0) return -1; - } =20 if (!tunpath) tunpath =3D "/dev/net/tun"; --=20 2.28.0