diff options
Diffstat (limited to 'src/mds-kbdc')
-rw-r--r-- | src/mds-kbdc/compile-layout.c | 5 | ||||
-rw-r--r-- | src/mds-kbdc/tree.c | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index c9ff65d..8e005c0 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -1071,7 +1071,7 @@ static size_t parse_variable(mds_kbdc_tree_t* restrict tree, const char* restric if (*raw == '0') goto bad; if (*raw == '.') goto bad; if (*raw == '\0') goto bad; - for (raw++; *raw; raw++) + for (; *raw; raw++) /* Check that the variable consists only of digits. */ if (('0' <= *raw) && (*raw <= '9')); /* However, it may end with a dot. */ @@ -2456,7 +2456,8 @@ static int compile_macro_call(mds_kbdc_tree_macro_call_t* restrict tree) /* Duplicate arguments and evaluate function calls, variable dereferences and escapes in the macro call arguments. */ - fail_if (arg = mds_kbdc_tree_dup(tree->arguments), arg == NULL); + if (tree->arguments) + fail_if (arg = mds_kbdc_tree_dup(tree->arguments), arg == NULL); fail_if (bad = evaluate_element(arg), bad < 0); if (bad) return 0; diff --git a/src/mds-kbdc/tree.c b/src/mds-kbdc/tree.c index b32c503..6ee98c1 100644 --- a/src/mds-kbdc/tree.c +++ b/src/mds-kbdc/tree.c @@ -242,7 +242,7 @@ void mds_kbdc_tree_free(mds_kbdc_tree_t* restrict this) /** - * Duplicate a subtree and goto `fail` on failure + * Duplicate a subtree and goto `pfail` on failure * * @param member:identifer The member in the tree to duplicate */ @@ -250,7 +250,7 @@ void mds_kbdc_tree_free(mds_kbdc_tree_t* restrict this) /** - * Duplicate a string and goto `fail` on failure + * Duplicate a string and goto `pfail` on failure * * @param member:identifer The member in the tree to duplicate */ @@ -258,7 +258,7 @@ void mds_kbdc_tree_free(mds_kbdc_tree_t* restrict this) /** - * Duplicate an UTF-32-string and goto `fail` on failure + * Duplicate an UTF-32-string and goto `pfail` on failure * * @param member:identifer The member in the tree to duplicate */ @@ -266,7 +266,7 @@ void mds_kbdc_tree_free(mds_kbdc_tree_t* restrict this) /** - * Duplicate a source code structure and goto `fail` on failure + * Duplicate a source code structure and goto `pfail` on failure * * @param member:identifer The member in the tree to copied */ |