diff --git a/coreapi/lpc2xml.c b/coreapi/lpc2xml.c index fbdb471ba..3180243d3 100644 --- a/coreapi/lpc2xml.c +++ b/coreapi/lpc2xml.c @@ -169,6 +169,7 @@ static void processSection_cb(const char *entry, struct __processSectionCtx *ctx if (lp_config_get_skip_flag_for_entry(ctx->ctx->lpc, ctx->section, entry)) { lpc2xml_log(ctx->ctx, LPC2XML_WARNING, "Skipped entry %s", entry); + ctx->ret = 0; return; } @@ -210,6 +211,7 @@ static void processConfig_cb(const char *section, struct __processConfigCtx *ctx if (lp_config_get_skip_flag_for_section(ctx->ctx->lpc, section)) { lpc2xml_log(ctx->ctx, LPC2XML_WARNING, "Skipped section %s", section); + ctx->ret = 0; return; } diff --git a/tools/lpc2xml_test.c b/tools/lpc2xml_test.c index b52ecbb51..ffb17f05b 100644 --- a/tools/lpc2xml_test.c +++ b/tools/lpc2xml_test.c @@ -56,8 +56,8 @@ int main(int argc, char *argv[]) { lpc = lp_config_new(argv[2]); if(strcmp("convert", argv[1]) == 0 && argc == 4) { ctx = lpc2xml_context_new(cb_function, NULL); - lpc2xml_convert_file(ctx, argv[3]); lpc2xml_set_lpc(ctx, lpc); + lpc2xml_convert_file(ctx, argv[3]); lpc2xml_context_destroy(ctx); } else if (strcmp("dump", argv[1]) == 0 && argc == 3) { char *dump = lp_config_dump_as_xml(lpc);