From 215da7f80a3846ffc8215fb82e061eb5f33de195 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 19 Apr 2020 23:51:44 -0500 Subject: [PATCH] Cleanup: ensure macro_ is pefixed in string macros --- level_0/f_string/c/string.h | 6 +++--- level_3/firewall/c/private-firewall.c | 2 +- level_3/firewall/c/private-firewall.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/level_0/f_string/c/string.h b/level_0/f_string/c/string.h index 68074ca..51c23eb 100644 --- a/level_0/f_string/c/string.h +++ b/level_0/f_string/c/string.h @@ -230,13 +230,13 @@ extern "C" { #define f_string_dynamic_initialize { f_string_initialize, 0, 0 } - #define f_clear_string_dynamic(dynamic) \ + #define f_macro_string_dynamic_clear(dynamic) \ dynamic.string = 0; \ dynamic.size = 0; \ dynamic.used = 0; #define f_macro_string_dynamic_new(status, dynamic, new_length) \ - f_clear_string_dynamic(dynamic) \ + f_macro_string_dynamic_clear(dynamic) \ status = f_memory_new((void **) & dynamic.string, sizeof(f_string), new_length); \ if (status == f_none) { \ dynamic.size = new_length; \ @@ -299,7 +299,7 @@ extern "C" { #define f_string_dynamics_initialize { 0, 0, 0 } - #define f_clear_string_dynamics(dynamics) \ + #define f_macro_string_dynamics_clear(dynamics) \ dynamics.array = 0; \ dynamics.size = 0; \ dynamics.used = 0; diff --git a/level_3/firewall/c/private-firewall.c b/level_3/firewall/c/private-firewall.c index 7aad2b6..5d1df25 100644 --- a/level_3/firewall/c/private-firewall.c +++ b/level_3/firewall/c/private-firewall.c @@ -958,7 +958,7 @@ f_return_status firewall_create_custom_chains(firewall_reserved_chains *reserved new_chain = f_false; } - f_clear_string_dynamic(fixed_string); + f_macro_string_dynamic_clear(fixed_string); if (new_chain) { while (j < data->chains.used) { diff --git a/level_3/firewall/c/private-firewall.h b/level_3/firewall/c/private-firewall.h index 2c3b1b1..e426759 100644 --- a/level_3/firewall/c/private-firewall.h +++ b/level_3/firewall/c/private-firewall.h @@ -101,7 +101,7 @@ typedef struct { arguments.array[arguments.used].used = argument.used; \ arguments.used++; \ \ - f_clear_string_dynamic(argument); + f_macro_string_dynamic_clear(argument); /** * Perform commands. -- 1.8.3.1