aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc/mds-kbdc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds-kbdc/mds-kbdc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mds-kbdc/mds-kbdc.c b/src/mds-kbdc/mds-kbdc.c
index f7bfb06..55e3587 100644
--- a/src/mds-kbdc/mds-kbdc.c
+++ b/src/mds-kbdc/mds-kbdc.c
@@ -19,6 +19,7 @@
#include "globals.h"
#include "make-tree.h"
+#include "simplify-tree.h"
#include <libmdsserver/macros.h>
@@ -46,7 +47,10 @@ int main(int argc_, char** argv_)
mds_kbdc_parsed_initialise(&result);
fail_if (parse_to_tree(argv[1], &result) < 0);
- fatal = mds_kbdc_parsed_is_fatal(&result);
+ if (fatal = mds_kbdc_parsed_is_fatal(&result), fatal)
+ goto stop;
+ fail_if (simplify_tree(&result) < 0);
+ stop:
mds_kbdc_tree_print(result.tree, stderr);
mds_kbdc_parsed_print_errors(&result, stderr);
mds_kbdc_parsed_destroy(&result);