]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/busctl/busctl-introspect.c
Merge pull request #17549 from yuwata/tiny-fixes
[thirdparty/systemd.git] / src / busctl / busctl-introspect.c
index 18254efd2d35a89312c84cc13e293db627cc0188..7a5d57f8c83705b331213d088f2e2d65953899b5 100644 (file)
@@ -1,9 +1,10 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
 #include "alloc-util.h"
 #include "busctl-introspect.h"
+#include "path-util.h"
 #include "string-util.h"
 #include "util.h"
 #include "xml.h"
@@ -250,10 +251,7 @@ static int parse_xml_node(Context *context, const char *prefix, unsigned n_depth
                                         node_path = TAKE_PTR(name);
                                 else {
 
-                                        if (endswith(prefix, "/"))
-                                                node_path = strappend(prefix, name);
-                                        else
-                                                node_path = strjoin(prefix, "/", name);
+                                        node_path = path_join(prefix, name);
                                         if (!node_path)
                                                 return log_oom();
                                 }