From 4df07f8e286ebfacb70c87ee499a4d2c42b772e9 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Tue, 28 Jun 2022 13:14:18 -0500 Subject: T4491: use empty string for name of config_tree root node The practice of using "root" for the internal name of the root node collides with actual nodes named "root", due to a utility function that checks 'if root' by name. Use empty string as name of root node, as no actual node will match. --- src/vyos1x_parser.mly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vyos1x_parser.mly') diff --git a/src/vyos1x_parser.mly b/src/vyos1x_parser.mly index c31552f..ba1c5a7 100644 --- a/src/vyos1x_parser.mly +++ b/src/vyos1x_parser.mly @@ -103,7 +103,7 @@ node_content: n = node { n } | n = leaf_node { n } | n = tag_node { n }; %public config: | ns = list(node_content); EOF { - let root = make "root" in + let root = make "" in let root = List.fold_left Vytree.adopt root (List.rev ns) |> Vytree.merge_children merge_data in try List.iter find_duplicate_children (Vytree.children_of_node root); -- cgit v1.2.3