From f0dd38e324da3243cdb2687ca5233651657134ad Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 27 Oct 2020 22:56:10 -0500 Subject: [PATCH] Bugfix: firewall and fake were not updated to utilize f_fss_comments_t. Being out of date with the latest API changes prevents them from compiling. --- level_3/fake/c/private-make.c | 18 +++++++++--------- level_3/firewall/c/private-firewall.c | 4 +++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/level_3/fake/c/private-make.c b/level_3/fake/c/private-make.c index b70314d..ab46c21 100644 --- a/level_3/fake/c/private-make.c +++ b/level_3/fake/c/private-make.c @@ -204,24 +204,24 @@ extern "C" { { f_string_range_t range = f_macro_string_range_t_initialize(data_make->buffer.used); f_fss_delimits_t delimits = f_fss_delimits_t_initialize; + f_fss_comments_t comments = f_fss_comments_t_initialize; - *status = fll_fss_basic_list_read(&data_make->buffer, &range, &list_objects, &list_contents, &delimits, 0); + *status = fll_fss_basic_list_read(&data_make->buffer, &range, &list_objects, &list_contents, &delimits, 0, &comments); if (F_status_is_error(*status)) { fake_print_error_fss(data, *status, "fll_fss_basic_list_read", data.file_data_build_fakefile.string, range, F_true); - - f_macro_fss_delimits_t_delete_simple(delimits); - f_macro_fss_objects_t_delete_simple(list_objects); - f_macro_fss_contents_t_delete_simple(list_contents); - return; } + else { + *status = fl_fss_apply_delimit(delimits, &data_make->buffer); - *status = fl_fss_apply_delimit(delimits, &data_make->buffer); + if (F_status_is_error(*status)) { + fll_error_print(data.error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true); + } + } if (F_status_is_error(*status)) { - fll_error_print(data.error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true); - f_macro_fss_delimits_t_delete_simple(delimits); + f_macro_fss_comments_t_delete_simple(comments); f_macro_fss_objects_t_delete_simple(list_objects); f_macro_fss_contents_t_delete_simple(list_contents); return; diff --git a/level_3/firewall/c/private-firewall.c b/level_3/firewall/c/private-firewall.c index 60d2468..9e1b3fc 100644 --- a/level_3/firewall/c/private-firewall.c +++ b/level_3/firewall/c/private-firewall.c @@ -1394,11 +1394,12 @@ f_return_status firewall_buffer_rules(const f_string_t filename, const bool opti } f_fss_delimits_t delimits = f_fss_delimits_t_initialize; + f_fss_comments_t comments = f_fss_comments_t_initialize; { f_string_range_t input = f_macro_string_range_t_initialize(local->buffer.used); - status = fll_fss_basic_list_read(&local->buffer, &input, &local->chain_objects, &local->chain_contents, &delimits, 0); + status = fll_fss_basic_list_read(&local->buffer, &input, &local->chain_objects, &local->chain_contents, &delimits, 0, &comments); } if (F_status_is_error(status)) { @@ -1426,6 +1427,7 @@ f_return_status firewall_buffer_rules(const f_string_t filename, const bool opti } f_macro_fss_delimits_t_delete_simple(delimits); + f_macro_fss_comments_t_delete_simple(comments); return status; } -- 1.8.3.1