From nobody Mon Feb 9 17:06:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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 (zohomail.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=1589369003; cv=none; d=zohomail.com; s=zohoarc; b=m5Ca2ObYdQQ5hLQ7SQJTcrH9qi6YnMeMf27maDwdfkE9FeLkjYpjiu3wOyI4SUgOrQnUoG9Z3YQlmHp7iajpopyG4Tyx7daBADCa7aIzVXZBouvVXiYRCVOk4bIyv8ZpZJ2ueofXYLLR3d6cRuQveFW8eDFJR46Y6K5RWeI7vfg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589369003; 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=6HC2fAafFkIdB7PV8jvTYqJsfO6Eai3Eau9/mPRnB2I=; b=Wc9Zh+0LBWmLMDJuwKFGziNl2bhSqCCFplCyP2tPgwZ8u/IJIXYlpb9lZYt5lsFq5XzZEO+pUZEf8eWLk1Sc8UZWq1xK9epHMO/6q5NFXMfLDYY4mPY1wXGzTHBdD0kdLbM+bF+vtvu3AE/MyaFAzYq88scv3L/DgMm7CA9Iwtw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.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-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 158936900385620.04804924236589; Wed, 13 May 2020 04:23:23 -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-511-C2FlAIxgN4ufh4jVCHue3Q-1; Wed, 13 May 2020 07:23:20 -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 4C3B4107ACF5; Wed, 13 May 2020 11:23:15 +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 2C53C78376; Wed, 13 May 2020 11:23:15 +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 F24B74CAA8; Wed, 13 May 2020 11:23:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04DBN90I013187 for ; Wed, 13 May 2020 07:23:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id DFFAD7D8F7; Wed, 13 May 2020 11:23:09 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E33E6A960 for ; Wed, 13 May 2020 11:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589369002; 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=6HC2fAafFkIdB7PV8jvTYqJsfO6Eai3Eau9/mPRnB2I=; b=RD+kdHcTajVzrvslNpafsbPifb3I4bjj24gv5Tz/Swc9GENryAEeoHoFEQfhQgQ0g2D9lS owsif+o4febRpO3W9wr9y5OaF1p2HVP7SQZxdZhkQ9Pv8od0IubbyeBXIor2vi60IAmUlC Ne/RAg0MkWLwn/JaTt7LR1/vcJ9CdDo= X-MC-Unique: C2FlAIxgN4ufh4jVCHue3Q-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/5] virNetDevOpenvswitchConstructVlans: return void Date: Wed, 13 May 2020 13:23:00 +0200 Message-Id: <6c0af6be64e80ec234b0e88eb46561a521894873.1589368474.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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-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" This function returns nothing else than zero. Make it void. Signed-off-by: Michal Privoznik --- src/util/virnetdevopenvswitch.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitc= h.c index c9e0c4e956..c4cf2cf476 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -64,17 +64,14 @@ virNetDevOpenvswitchAddTimeout(virCommandPtr cmd) * * Construct the VLAN configuration parameters to be passed to * ovs-vsctl command. - * - * Returns 0 in case of success or -1 in case of failure. */ -static int +static void virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, const virNetDevVlan = *virtVlan) { - int ret =3D -1; g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; =20 if (!virtVlan || !virtVlan->nTags) - return 0; + return; =20 switch (virtVlan->nativeMode) { case VIR_NATIVE_VLAN_MODE_TAGGED: @@ -112,9 +109,6 @@ virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, c= onst virNetDevVlan *virtV } else if (virtVlan->nTags) { virCommandAddArgFormat(cmd, "tag=3D%d", virtVlan->tag[0]); } - - ret =3D 0; - return ret; } =20 /** @@ -162,8 +156,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, con= st char *ifname, virCommandAddArgList(cmd, "--", "--if-exists", "del-port", ifname, "--", "add-port", brname, ifname, NULL); =20 - if (virNetDevOpenvswitchConstructVlans(cmd, virtVlan) < 0) - return -1; + virNetDevOpenvswitchConstructVlans(cmd, virtVlan); =20 if (ovsport->profileID[0] =3D=3D '\0') { virCommandAddArgList(cmd, @@ -547,8 +540,7 @@ int virNetDevOpenvswitchUpdateVlan(const char *ifname, "--", "--if-exists", "clear", "Port", ifname, "vl= an_mode", "--", "--if-exists", "set", "Port", ifname, NULL); =20 - if (virNetDevOpenvswitchConstructVlans(cmd, virtVlan) < 0) - return -1; + virNetDevOpenvswitchConstructVlans(cmd, virtVlan); =20 if (virCommandRun(cmd, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, --=20 2.26.2