diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-10-10 12:18:08 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-10-10 13:26:21 +0200 |
commit | 1b4f2ba28ecd24895a37776873e537631980f3e7 (patch) | |
tree | 02c259b9b8789dee64dc2ede3b1c8875fadc7bcc | |
parent | busctl: use set_ensure_consume() (diff) | |
download | systemd-1b4f2ba28ecd24895a37776873e537631980f3e7.tar.xz systemd-1b4f2ba28ecd24895a37776873e537631980f3e7.zip |
busctl: shorten code a bit
-rw-r--r-- | src/busctl/busctl-introspect.c | 3 |
1 files changed, 1 insertions, 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(); |