From nobody Fri Mar 29 00:37:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1610104525; cv=none; d=zohomail.com; s=zohoarc; b=f6OPTGw18uk5ef8t18gggABw2O+s12TKGejNiOkLNrtpQy+m/tmTrQLh/prellPiPbANcED8gACPCzYaXeGRhzZw8kgh2ITN8fMpanAU8kMenAw+Sen24Y/VDvGlzM01J6RtbPqU6lTZGOTQmu8Mq8rREsSs7LCHyViZn8xQKgk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610104525; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=uwDka/YKe0WNNY+/1IPeoYSHhaGDRuu04G5o0kSzsYg=; b=PL3X17UD9mEoadRKwuXnoy6vwetS/ho5MI9guXODqolE4oKl0SNFiQ8eHVo16TRX3oo3H2ZwgL+ALIc8OUGuHQMTRNtxzaNP37bkaMk9Yc5nzxtmKUMxSPkWZJVmLBg3ZUwlmuQo5VwCRKiVpWw5yReHgIukXGSEjUzAvCDLByE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1610104525128830.4046132231881; Fri, 8 Jan 2021 03:15:25 -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-76-d-KOChtvPUOAm5Lz5dhhsw-1; Fri, 08 Jan 2021 06:15:21 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 51089800D62; Fri, 8 Jan 2021 11:15:16 +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 C07E560937; Fri, 8 Jan 2021 11:15:13 +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 7F482180954D; Fri, 8 Jan 2021 11:15:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 108BF8Tc018615 for ; Fri, 8 Jan 2021 06:15:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id DDFC219D7D; Fri, 8 Jan 2021 11:15:08 +0000 (UTC) Received: from nautilus.redhat.com (unknown [10.40.192.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 362F619C48; Fri, 8 Jan 2021 11:15:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610104523; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uwDka/YKe0WNNY+/1IPeoYSHhaGDRuu04G5o0kSzsYg=; b=PIp2fOlpiPHbtG7ScFvQakyQPvpVw0QWXR4chz2BSeDopMNRpWiX+na3Q3K8zVVl9a1UIn Zy8fArue9VVpxkVEz4OVJFOpbB7dOJ3AGmKF6YLYa2Tufip5sJxJj0AuKIFPOFBaM3KQry N9sJr2/ToUFv8FnSfawxqls/PgBvPN4= X-MC-Unique: d-KOChtvPUOAm5Lz5dhhsw-1 From: Erik Skultety To: libvir-list@redhat.com Subject: [libvirt PATCH] Fix MinGW pipeline after 49cb59778a4e6c2d04bb9383a9d97fbbc83f9fce Date: Fri, 8 Jan 2021 12:15:04 +0100 Message-Id: <0ece9e32911952ad6c44fc85331ca64c37450478.1610104429.git.eskultet@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: eskultet@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.13 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" Signed-off-by: Erik Skultety --- personal pipeline: https://gitlab.com/eskultety/libvirt/-/pipelines/2390029= 89 Pushed under the build breaker rule. src/util/virmdev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/virmdev.c b/src/util/virmdev.c index fc27e9e45d..46db6249de 100644 --- a/src/util/virmdev.c +++ b/src/util/virmdev.c @@ -354,7 +354,12 @@ virMediatedDevicePtr virMediatedDeviceListSteal(virMediatedDeviceListPtr list, virMediatedDevicePtr dev) { - int idx =3D virMediatedDeviceListFindIndex(list, dev->path); + int idx =3D -1; + + if (!dev) + return NULL; + + idx =3D virMediatedDeviceListFindIndex(list, dev->path); =20 return virMediatedDeviceListStealIndex(list, idx); } --=20 2.29.2