From 1b4f2ba28ecd24895a37776873e537631980f3e7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 10 Oct 2021 19:18:08 +0900 Subject: busctl: shorten code a bit --- src/busctl/busctl-introspect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/busctl/busctl-introspect.c b/src/busctl/busctl-introspect.c index 4dbb11f15b..9fbe9ebb5e 100644 --- a/src/busctl/busctl-introspect.c +++ b/src/busctl/busctl-introspect.c @@ -228,7 +228,7 @@ static int parse_xml_node(Context *context, const char *prefix, unsigned n_depth (t == XML_TAG_CLOSE && streq_ptr(name, "node"))) { if (context->ops->on_path) { - r = context->ops->on_path(node_path ? node_path : np, context->userdata); + r = context->ops->on_path(node_path ?: np, context->userdata); if (r < 0) return r; } @@ -250,7 +250,6 @@ static int parse_xml_node(Context *context, const char *prefix, unsigned n_depth if (name[0] == '/') node_path = TAKE_PTR(name); else { - node_path = path_join(prefix, name); if (!node_path) return log_oom(); -- cgit v1.2.3