From nobody Mon Feb 9 14:00:07 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 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 1613406665047613.667991570706; Mon, 15 Feb 2021 08:31:05 -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-426-4PquBHD1Pqu14jrtfgRM9A-1; Mon, 15 Feb 2021 11:30:18 -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 BDF9F1008303; Mon, 15 Feb 2021 16:30:12 +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 8B91F608DB; Mon, 15 Feb 2021 16:30:12 +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 45D2749; Mon, 15 Feb 2021 16:30:12 +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 11FGTk9M026793 for ; Mon, 15 Feb 2021 11:29:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 489615C541; Mon, 15 Feb 2021 16:29:46 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.96]) by smtp.corp.redhat.com (Postfix) with ESMTP id BE0E45C233 for ; Mon, 15 Feb 2021 16:29:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613406663; 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=qcD2qGlvebS5R1GaL0HLYLv7GcGtZSvKd2ylFfb4m5s=; b=WbmI4st579IGx0lbyi/S+6eia9/UCMVoWpyAZYvKdp76r3Abta3j1KLNTWJSz5rsNtie6y /PgqhhcHZntAPU5SVxYU2+MOgt7BVR+75Pxz7zlDnTEpizGqboCg/4YYahTnmd+hYoy2er m8Fj0xSaZo70lX0aDYzlx4L9pWX/CNo= X-MC-Unique: 4PquBHD1Pqu14jrtfgRM9A-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/3] qemu: Drop needless check in virDomainFSInfoFormat() Date: Mon, 15 Feb 2021 17:29:32 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.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" As the very first thing, this function checks whether the number of items inside @agentinfo array is not negative. This is redundant as the only caller - qemuDomainGetFSInfo() already checked for that and would not even call this function if that was the case. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3d54653217..f59f9e13ba 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -18966,8 +18966,6 @@ virDomainFSInfoFormat(qemuAgentFSInfoPtr *agentinfo, virDomainFSInfoPtr *info_ret =3D NULL; size_t i; =20 - if (nagentinfo < 0) - return ret; info_ret =3D g_new0(virDomainFSInfoPtr, nagentinfo); =20 for (i =3D 0; i < nagentinfo; i++) { --=20 2.26.2