From nobody Sat May 11 03:33:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1574936666; cv=none; d=zohomail.com; s=zohoarc; b=TLoumuEXCsCgZW8R4dB2UFw5TYJnlwBA3dUlhXrxe6x8pVlNlyLRbWeSsmtTMkKZtR0YKgxolDzkX0bEnQhXE441d8kmLznO8vI5vxgFT4vfm0T3DVgF5194xrMWXAkDWg4r5D3vb+nHwOHxb4z2fn6SmIgWmB+nDfWdouC04zs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574936666; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=0xqqdu1m+rT/8k8ci2c/B2+ktW2tkvyhE0iYfFdo5mg=; b=ICLkzjpNW8ZXN0EBA+xQ4J8P60zBtzJ15zeZeXwgfvX6QJolwQjEdSMqJKQ54V5RzO0i5HnpqmdS9sM2lQqUqzIk1uLwOWvIpHKoF1/Ep1YFs+lXe3Cc0GpPOeCBmV2u/fto49J1/nPu/It+8UVOxetuWez8BwzUdFUda2VgvkE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1574936666353162.47458868716933; Thu, 28 Nov 2019 02:24:26 -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-353-JIMqmzGaPseRb0j1yV4LpQ-1; Thu, 28 Nov 2019 05:24:23 -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 A2122107ACC4; Thu, 28 Nov 2019 10:24:17 +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 6368A60BE0; Thu, 28 Nov 2019 10:24:17 +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 EEA0318089C8; Thu, 28 Nov 2019 10:24:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xASAOFh3030384 for ; Thu, 28 Nov 2019 05:24:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 287A75C1B2; Thu, 28 Nov 2019 10:24:15 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F193B5C1B0 for ; Thu, 28 Nov 2019 10:24:12 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id DB47C103231; Thu, 28 Nov 2019 11:24:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574936665; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0xqqdu1m+rT/8k8ci2c/B2+ktW2tkvyhE0iYfFdo5mg=; b=WWL0Z2J7Ie0XjVLeNzcIiXP8wAGhfympr5c7rA46Njhew6Vv+pOdg9cyQMhMjEAO9lPbE9 X47RKj5ML7nFSw8D5OMuFKYG0v5GYCaa6sXdfB7XawqcmltfmmQZUNwkmwGB5sEef22q8y pQKYTm0bU25okyHX4LzZk4veLvTS9vo= From: Jiri Denemark To: libvir-list@redhat.com Date: Thu, 28 Nov 2019 11:24:04 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Fix migration without parameters 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 X-MC-Unique: JIMqmzGaPseRb0j1yV4LpQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The virTypedParamsFilter function doesn't mind params =3D=3D NULL if nparams is zero. And there's no need to check for params =3D=3D NULL && nparams > 0 because this is checked higher in the stack. In fact all the virCheckNonNull* checks in virTypedParamsFilter are useless. https://bugzilla.redhat.com/show_bug.cgi?id=3D1777094 Signed-off-by: Jiri Denemark Reviewed-by: Daniel Henrique Barboza Reviewed-by: Erik Skultety --- src/util/virtypedparam.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c index 603fcf213a..be3dac1571 100644 --- a/src/util/virtypedparam.c +++ b/src/util/virtypedparam.c @@ -403,10 +403,6 @@ virTypedParamsFilter(virTypedParameterPtr params, { size_t i, n =3D 0; =20 - virCheckNonNullArgGoto(params, error); - virCheckNonNullArgGoto(name, error); - virCheckNonNullArgGoto(ret, error); - if (VIR_ALLOC_N(*ret, nparams) < 0) goto error; =20 --=20 2.24.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list