From nobody Sun Feb 8 14:41:51 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=1605878059; cv=none; d=zohomail.com; s=zohoarc; b=OD4SqQXcuqQqC/A2L3wEwWfVdq4IG2D29HzSi5YpUxq986sEkg7U07mBtvl3jWA3X98ZmXZnlbcbhBk9aydO8AitBk1t5ltXqDXYzheInTfbLrMXX5lTCpG6NNGLzMKzSAaZhU8hqxKxpq5u/GaGPeZ1rnUQEFxMq/XbSzTPHxA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605878059; 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=kQPFpi/V/3jj8SJowasy890g9CMlg4pfw68pdDptAC8=; b=BzK7IdMmEsZwJELWU+CsYemkgQx4L2tCr0BYl7T4nuKKU+1podClhQETHi5KoEpz841QmEwYQgFemEQ7nz/CkjDLD2/IUapXTM/4DO309oLW19wHfpjvb61Tge+EinjHj+JjLSRKQpRGqCnQe/YQ6ZXvoW4zsIZjycD1RMl08J8= 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 1605878059376538.6108152473522; Fri, 20 Nov 2020 05:14:19 -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-383-gVlG7h0-M4ivf6eQufFShg-1; Fri, 20 Nov 2020 08:14:15 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8FB19814411; Fri, 20 Nov 2020 13:14:09 +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 274EA10016F4; Fri, 20 Nov 2020 13:14:09 +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 AA8771809CA0; Fri, 20 Nov 2020 13:14:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKDE5Wi026332 for ; Fri, 20 Nov 2020 08:14:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6C3C310021AA; Fri, 20 Nov 2020 13:14:05 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id E88D110016F4 for ; Fri, 20 Nov 2020 13:14:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605878058; 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=kQPFpi/V/3jj8SJowasy890g9CMlg4pfw68pdDptAC8=; b=F23lhFEOuhZqZh4KXX8h3VWbaRF4T7YqNi5Q5XF15IZWigTag86KnAMP0xqMmzd0JUNnM3 wobdaKrxqddwfI+RGshaTeP7MhcvRuY9gkrcicfQOvfN6VOTBAU/cxziixMj9l+iKURPhb 1xCvmdq9uwJNXfk2ziXFRwW0KimMEow= X-MC-Unique: gVlG7h0-M4ivf6eQufFShg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] udevConnectListAllInterfaces: initialize ret Date: Fri, 20 Nov 2020 14:13:58 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.84 on 10.5.11.22 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Currently, ret is only used in the 'cleanup' section and initialized right before the jump. Switch to the customary initialization to -1 and only leave in the 'ret =3D 0' statement on an empty list. Signed-off-by: J=C3=A1n Tomko --- src/interface/interface_backend_udev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/interface/interface_backend_udev.c b/src/interface/interfa= ce_backend_udev.c index ce007fd29e..31246dde74 100644 --- a/src/interface/interface_backend_udev.c +++ b/src/interface/interface_backend_udev.c @@ -303,7 +303,7 @@ udevConnectListAllInterfaces(virConnectPtr conn, int tmp_count; int count =3D 0; int status =3D 0; - int ret; + int ret =3D -1; =20 virCheckFlags(VIR_CONNECT_LIST_INTERFACES_FILTERS_ACTIVE, -1); =20 @@ -320,7 +320,6 @@ udevConnectListAllInterfaces(virConnectPtr conn, virReportError(VIR_ERR_INTERNAL_ERROR, _("failed to get list of %s interfaces on host"), virUdevStatusString(status)); - ret =3D -1; goto cleanup; } =20 --=20 2.26.2