]> Kevux Git Server - kevux-firewall/commitdiff
Update: Avoid the use of bool, keeping it to a bare minimum.
authorKevin Day <Kevin@kevux.org>
Mon, 1 Dec 2025 01:41:55 +0000 (19:41 -0600)
committerKevin Day <Kevin@kevux.org>
Mon, 1 Dec 2025 01:41:55 +0000 (19:41 -0600)
Use `uint8_t` to both enforce a specific byte size as well as provide the ability for it to be converted into a set of bits if need be, without breaking API or ABI.

sources/c/program/firewall/main/operate/buffer.c
sources/c/program/firewall/main/operate/buffer.h

index a6be115b5f2f57dfa96cb6bf7a5be8a9f3c68d94..d0a9362accb2c7dd7e578f9d2e19ce5b3461524d 100644 (file)
@@ -5,7 +5,7 @@ extern "C" {
 #endif
 
 #ifndef _di_firewall_operate_buffer_chain_
-  void firewall_operate_buffer_chain(firewall_main_t * const main, const f_string_static_t file, const bool optional) {
+  void firewall_operate_buffer_chain(firewall_main_t * const main, const f_string_static_t file, const uint8_t optional) {
 
     if (!main || F_status_is_error_not(main->setting.state.status) && main->setting.state.status == F_child) return;
 
index eb48406c285fdba309ac85eba6970ef2fbe08f64..d804a8795fedbe6ce92a0e650d5e1b1fbc93512f 100644 (file)
@@ -53,7 +53,7 @@ extern "C" {
  * @see fll_fss_basic_list_read()
  */
 #ifndef _di_firewall_operate_buffer_chain_
-  extern void firewall_operate_buffer_chain(firewall_main_t * const main, const f_string_static_t file, const bool optional);
+  extern void firewall_operate_buffer_chain(firewall_main_t * const main, const f_string_static_t file, const uint8_t optional);
 #endif // _di_firewall_operate_buffer_chain_
 
 /**