From nobody Mon Feb 9 18:18:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1576749960; cv=none; d=zohomail.com; s=zohoarc; b=iIsWUV/Mn0mGiVMNF2MnA56gQRbvdP3jq4W1tek1QHqORu3ayH7vXC9y71N9upcUgTkAF1HxL3kQtaqSncfXqsIADEo/lGPs3vE3enpj04GASmhfBAd7jg39KaJBka8Jxr4VJdiCpcLTAYtI/kHZdODsDh+IGv+oVTzhLHAnY/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576749960; h=Content-Type:Content-Transfer-Encoding:Cc: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=sgBxznqyloo1qUwAxwmGsl8rlc48O2K6SvzAovjqWAU=; b=k3XqrPTc4/Z073nAqfo6+qHzzGpqe9mVXLlxERBfOUL9DBaKlNgxhM5Til8c9Y7SGJiBpjT7Khmg+R9xy4etaqsU/uHcpzhAStrRJN/TB6w4BKGdE59F/Gm2Fqmh1vWmR648s+ADrboCMAcm77azL7V4CuOlZAzaQ7Z9z94qO9E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1576749960957546.495559522974; Thu, 19 Dec 2019 02:06:00 -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-197-6wAlX91sO6qajzWeo-pY3A-1; Thu, 19 Dec 2019 05:05:57 -0500 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 21B6D1007269; Thu, 19 Dec 2019 10:05:52 +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 E7B656046B; Thu, 19 Dec 2019 10:05:51 +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 94784104873; Thu, 19 Dec 2019 10:05:51 +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 xBJA5X5k011093 for ; Thu, 19 Dec 2019 05:05:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4444C26E48; Thu, 19 Dec 2019 10:05:33 +0000 (UTC) Received: from laerte.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95D0B26DF9; Thu, 19 Dec 2019 10:05:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576749959; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=sgBxznqyloo1qUwAxwmGsl8rlc48O2K6SvzAovjqWAU=; b=OqjU4Kcj3j8rwQM4R05WYUC5904ggsX+VBN2CwZ0rpte33Ux8UjgUvAsIZroimTRu3Zxbl Z8ZhaK/GflxWiRwPDLcHsAqTNQYzep+tk8ORtiR5F5oCekFqQHcwdlPPgdj7oWtHcx/lo0 cgYYMtntsLlYgnpcVwecZPNF+6mrGsQ= From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= To: libvir-list@redhat.com Date: Thu, 19 Dec 2019 11:04:35 +0100 Message-Id: <20191219100447.210836-31-fidencio@redhat.com> In-Reply-To: <20191219100447.210836-1-fidencio@redhat.com> References: <20191219100447.210836-1-fidencio@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Subject: [libvirt] [PATCH 30/42] node_device: Don't check the output of virGetUserRuntimeDirectory() 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 X-MC-Unique: 6wAlX91sO6qajzWeo-pY3A-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: Fabiano Fid=C3=AAncio Reviewed-by: J=C3=A1n Tomko --- src/node_device/node_device_hal.c | 3 +-- src/node_device/node_device_udev.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_devic= e_hal.c index b40f93df46..cf12854fe9 100644 --- a/src/node_device/node_device_hal.c +++ b/src/node_device/node_device_hal.c @@ -618,8 +618,7 @@ nodeStateInitialize(bool privileged G_GNUC_UNUSED, } else { g_autofree char *rundir =3D NULL; =20 - if (!(rundir =3D virGetUserRuntimeDirectory())) - goto failure; + rundir =3D virGetUserRuntimeDirectory(); driver->stateDir =3D g_strdup_printf("%s/nodedev/run", rundir); } =20 diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index cae00dc9dc..eedcd123a3 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1806,8 +1806,7 @@ nodeStateInitialize(bool privileged, } else { g_autofree char *rundir =3D NULL; =20 - if (!(rundir =3D virGetUserRuntimeDirectory())) - goto cleanup; + rundir =3D virGetUserRuntimeDirectory(); driver->stateDir =3D g_strdup_printf("%s/nodedev/run", rundir); } =20 --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list