[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tools/xenstored: remove unneeded check in create_node()


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Juergen Gross <jgross@xxxxxxxx>
  • Date: Mon, 30 Mar 2026 18:31:53 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=susede1 header.d=suse.com header.i="@suse.com" header.h="From:Date:Message-ID:To:Cc:MIME-Version:Content-Transfer-Encoding"; dkim=pass header.s=susede1 header.d=suse.com header.i="@suse.com" header.h="From:Date:Message-ID:To:Cc:MIME-Version:Content-Transfer-Encoding"
  • Authentication-results: smtp-out1.suse.de; none
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Mon, 30 Mar 2026 16:32:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

create_node() is called only for issued xenstore commands. This means
that the "conn" parameter is never NULL.

Remove checking whether "conn" is not NULL.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 tools/xenstored/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c
index 4786a2a82e..34cb266e8a 100644
--- a/tools/xenstored/core.c
+++ b/tools/xenstored/core.c
@@ -1524,7 +1524,7 @@ static struct node *create_node(struct connection *conn, 
const void *ctx,
        if (!node)
                return NULL;
 
-       if (conn && conn->transaction)
+       if (conn->transaction)
                ta_node_created(conn->transaction);
 
        node->data = data;
-- 
2.53.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.