From nobody Mon Feb 9 01:48:28 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=1628009223; cv=none; d=zohomail.com; s=zohoarc; b=MIqPeoouXye35neKSVcKOzB5Bhj5aI/B0gZ9z8AHN67QhXng8xXs2ABlWlrzbuv6NECsXS/nuKilw9BuwH0tbmUdCzXssHhPg87P2vvQjofECWcH/ZOwQ5Upe2stye1a046X8quCcZJ4ArlK7zlkQl+vI4+5b71bWP+dw4eroDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628009223; 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=chwNDSkD0Z+fvru4639aq4qBK9qC41yYT6gzD3VxuKM=; b=BWRe6JGBChgvMGFrzRaXB8Hs8helMhsRYupWrTrqYcWvUqc0K2JNp4djCBMCgbB2l7gQiLBuwoR8JKFA7nZPW/kVPwh8iRnPbZwKaFDv6NmnocpAxaMU3PoJoMrS1A3ybPEIvbwWgR1ZqNM/PPQtgEld2feQsSJpJnpakjr74J0= 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) 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 1628009223893325.55650255451167; Tue, 3 Aug 2021 09:47:03 -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-353-u60y-OVpPXmfB1WhUg-_8g-1; Tue, 03 Aug 2021 12:47:01 -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 84A5593920; Tue, 3 Aug 2021 16:46:55 +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 24CD2136F5; Tue, 3 Aug 2021 16:46:55 +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 3B277181A2A6; Tue, 3 Aug 2021 16:46:51 +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 173CWpNY022528 for ; Tue, 3 Aug 2021 08:32:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id D65AD175B3; Tue, 3 Aug 2021 12:32:51 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54FA75E7A1 for ; Tue, 3 Aug 2021 12:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628009222; 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=chwNDSkD0Z+fvru4639aq4qBK9qC41yYT6gzD3VxuKM=; b=VFXvLC/E/xxERtg8pNN9qia86IGaAP0L3YwM4ik0cIdWhdCMkoKp8nTeHUoTOjav1ilIzz zgkC/U010gMUf1QYpOUoQQ+2p0m1kwqznzh5SgW9j/xnoPrjBpifYoUIwXrZ2JeLtXlunD Y6fpQMxFxPzPB4nUWxVmxknHNUlmpIY= X-MC-Unique: u60y-OVpPXmfB1WhUg-_8g-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 4/7] vmx: Drop needless check in virVMXParseDisk() Date: Tue, 3 Aug 2021 14:32:28 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 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) X-ZM-MESSAGEID: 1628009226336100002 Content-Type: text/plain; charset="utf-8" After previous patch it can no longer happen that @def will be NULL and *def won't be. Signed-off-by: Michal Privoznik --- src/vmx/vmx.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 7a934e067d..11b6fcbdf8 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -2218,11 +2218,6 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOpti= on *xmlopt, virConf *conf, char mode_name[32] =3D ""; char *mode =3D NULL; =20 - if (def =3D=3D NULL || *def !=3D NULL) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument")= ); - return -1; - } - if (!(*def =3D virDomainDiskDefNew(xmlopt))) return -1; =20 --=20 2.31.1